From 96ce6952bdfaf1add77e1d9cd1c716cdf09bfd7a Mon Sep 17 00:00:00 2001 From: Victor Kropp Date: Mon, 18 Jan 2016 14:58:06 +0100 Subject: [PATCH] regenerate --- src/main/java/org/schema/APIReference.java | 636 +++++++-------- src/main/java/org/schema/Abdomen.java | 4 +- src/main/java/org/schema/AboutPage.java | 620 +++++++-------- src/main/java/org/schema/AcceptAction.java | 118 +-- .../java/org/schema/AccountingService.java | 206 ++--- src/main/java/org/schema/AchieveAction.java | 102 +-- src/main/java/org/schema/Action.java | 106 +-- .../java/org/schema/ActionCollabClass.java | 8 +- .../java/org/schema/ActionStatusType.java | 70 +- src/main/java/org/schema/ActivateAction.java | 102 +-- .../java/org/schema/ActiveActionStatus.java | 8 +- .../java/org/schema/ActiveNotRecruiting.java | 8 +- src/main/java/org/schema/AddAction.java | 110 +-- .../java/org/schema/AdministrativeArea.java | 182 ++--- .../java/org/schema/AdultEntertainment.java | 206 ++--- src/main/java/org/schema/AerobicActivity.java | 8 +- src/main/java/org/schema/AggregateOffer.java | 372 ++++----- src/main/java/org/schema/AggregateRating.java | 108 +-- src/main/java/org/schema/AgreeAction.java | 102 +-- src/main/java/org/schema/Airline.java | 306 ++++---- src/main/java/org/schema/Airport.java | 194 ++--- src/main/java/org/schema/AlbumRelease.java | 8 +- src/main/java/org/schema/AlignmentObject.java | 74 +- .../schema/AllWheelDriveConfiguration.java | 8 +- src/main/java/org/schema/AllocateAction.java | 118 +-- src/main/java/org/schema/AmusementPark.java | 206 ++--- .../java/org/schema/AnaerobicActivity.java | 8 +- .../java/org/schema/AnatomicalStructure.java | 158 ++-- ...AnatomicalStructureOrAnatomicalSystem.java | 9 +- ...rAnatomicalSystemOrSuperficialAnatomy.java | 11 +- ...atomicalStructureOrSuperficialAnatomy.java | 9 +- .../java/org/schema/AnatomicalSystem.java | 146 ++-- src/main/java/org/schema/Anesthesia.java | 8 +- src/main/java/org/schema/AnimalShelter.java | 206 ++--- src/main/java/org/schema/Answer.java | 580 +++++++------- .../java/org/schema/ApartmentComplex.java | 182 ++--- src/main/java/org/schema/Appearance.java | 8 +- src/main/java/org/schema/AppendAction.java | 118 +-- src/main/java/org/schema/ApplyAction.java | 102 +-- .../java/org/schema/ApprovedIndication.java | 102 +-- src/main/java/org/schema/Aquarium.java | 186 ++--- src/main/java/org/schema/ArriveAction.java | 118 +-- src/main/java/org/schema/ArtGallery.java | 206 ++--- src/main/java/org/schema/Artery.java | 182 ++--- src/main/java/org/schema/Article.java | 624 +++++++-------- src/main/java/org/schema/AskAction.java | 154 ++-- src/main/java/org/schema/AssessAction.java | 102 +-- src/main/java/org/schema/AssignAction.java | 118 +-- src/main/java/org/schema/Attorney.java | 206 ++--- src/main/java/org/schema/Audience.java | 66 +- .../AudienceOrOrganizationOrPerson.java | 11 +- src/main/java/org/schema/AudioObject.java | 668 ++++++++-------- src/main/java/org/schema/AuthorizeAction.java | 142 ++-- src/main/java/org/schema/AutoBodyShop.java | 206 ++--- src/main/java/org/schema/AutoDealer.java | 206 ++--- src/main/java/org/schema/AutoPartsStore.java | 206 ++--- src/main/java/org/schema/AutoRental.java | 206 ++--- src/main/java/org/schema/AutoRepair.java | 206 ++--- src/main/java/org/schema/AutoWash.java | 206 ++--- src/main/java/org/schema/AutomatedTeller.java | 206 ++--- .../java/org/schema/AutomotiveBusiness.java | 206 ++--- .../org/schema/AutomotiveOntologyWGClass.java | 8 +- src/main/java/org/schema/Ayurvedic.java | 8 +- src/main/java/org/schema/Bacteria.java | 8 +- src/main/java/org/schema/Bakery.java | 222 +++--- src/main/java/org/schema/Balance.java | 8 +- .../java/org/schema/BankOrCreditUnion.java | 206 ++--- src/main/java/org/schema/BarOrPub.java | 222 +++--- src/main/java/org/schema/Beach.java | 186 ++--- src/main/java/org/schema/BeautySalon.java | 206 ++--- src/main/java/org/schema/BedAndBreakfast.java | 206 ++--- src/main/java/org/schema/BefriendAction.java | 102 +-- src/main/java/org/schema/BibExTerm.java | 8 +- src/main/java/org/schema/BikeStore.java | 206 ++--- src/main/java/org/schema/Blog.java | 564 +++++++------- src/main/java/org/schema/BlogPosting.java | 612 +++++++-------- src/main/java/org/schema/BloodTest.java | 138 ++-- .../java/org/schema/BoardingPolicyType.java | 70 +- src/main/java/org/schema/BodyOfWater.java | 182 ++--- src/main/java/org/schema/Bone.java | 158 ++-- src/main/java/org/schema/Book.java | 592 +++++++------- src/main/java/org/schema/BookFormatType.java | 70 +- src/main/java/org/schema/BookSeries.java | 564 +++++++------- src/main/java/org/schema/BookStore.java | 206 ++--- src/main/java/org/schema/BookmarkAction.java | 102 +-- ...leanOrNumberOrStringOrStructuredValue.java | 13 +- src/main/java/org/schema/BooleanOrString.java | 9 +- src/main/java/org/schema/BorrowAction.java | 126 +-- src/main/java/org/schema/BowlingAlley.java | 206 ++--- src/main/java/org/schema/BrainStructure.java | 158 ++-- src/main/java/org/schema/Brand.java | 82 +- .../java/org/schema/BrandOrOrganization.java | 9 +- src/main/java/org/schema/BreadcrumbList.java | 96 +-- .../org/schema/BreadcrumbListOrString.java | 9 +- src/main/java/org/schema/Brewery.java | 222 +++--- .../java/org/schema/BroadcastChannel.java | 78 +- src/main/java/org/schema/BroadcastEvent.java | 222 +++--- .../java/org/schema/BroadcastRelease.java | 8 +- .../java/org/schema/BroadcastService.java | 86 ++- src/main/java/org/schema/BuddhistTemple.java | 186 ++--- src/main/java/org/schema/BusReservation.java | 166 ++-- src/main/java/org/schema/BusStation.java | 186 ++--- .../java/org/schema/BusStationOrBusStop.java | 9 +- src/main/java/org/schema/BusStop.java | 186 ++--- src/main/java/org/schema/BusTrip.java | 122 +-- .../java/org/schema/BusinessAudience.java | 90 +-- .../java/org/schema/BusinessEntityType.java | 70 +- src/main/java/org/schema/BusinessEvent.java | 206 ++--- .../java/org/schema/BusinessFunction.java | 70 +- src/main/java/org/schema/BuyAction.java | 122 +-- src/main/java/org/schema/CDFormat.java | 8 +- src/main/java/org/schema/CT.java | 8 +- .../org/schema/CableOrSatelliteService.java | 114 +-- .../java/org/schema/CafeOrCoffeeShop.java | 222 +++--- src/main/java/org/schema/Campground.java | 186 ++--- src/main/java/org/schema/Canal.java | 182 ++--- src/main/java/org/schema/CancelAction.java | 106 +-- src/main/java/org/schema/Car.java | 486 ++++++------ src/main/java/org/schema/CarUsageType.java | 166 ++-- src/main/java/org/schema/Cardiovascular.java | 8 +- .../java/org/schema/CardiovascularExam.java | 8 +- src/main/java/org/schema/CaseSeries.java | 8 +- src/main/java/org/schema/Casino.java | 206 ++--- src/main/java/org/schema/CassetteFormat.java | 8 +- src/main/java/org/schema/CatholicChurch.java | 186 ++--- src/main/java/org/schema/Cemetery.java | 186 ++--- src/main/java/org/schema/CheckAction.java | 102 +-- src/main/java/org/schema/CheckInAction.java | 146 ++-- src/main/java/org/schema/CheckOutAction.java | 146 ++-- src/main/java/org/schema/CheckoutPage.java | 620 +++++++-------- src/main/java/org/schema/ChildCare.java | 206 ++--- src/main/java/org/schema/ChildrensEvent.java | 206 ++--- src/main/java/org/schema/Chiropractic.java | 8 +- src/main/java/org/schema/ChooseAction.java | 114 +-- src/main/java/org/schema/Church.java | 186 ++--- src/main/java/org/schema/City.java | 182 ++--- src/main/java/org/schema/CityHall.java | 186 ++--- src/main/java/org/schema/CivicStructure.java | 186 ++--- src/main/java/org/schema/Clinician.java | 8 +- src/main/java/org/schema/Clip.java | 604 +++++++-------- src/main/java/org/schema/ClothingStore.java | 206 ++--- src/main/java/org/schema/CoOp.java | 8 +- src/main/java/org/schema/Code.java | 556 +++++++------- src/main/java/org/schema/CohortStudy.java | 8 +- src/main/java/org/schema/CollectionPage.java | 620 +++++++-------- .../java/org/schema/CollegeOrUniversity.java | 302 ++++---- src/main/java/org/schema/ComedyClub.java | 206 ++--- src/main/java/org/schema/ComedyEvent.java | 206 ++--- src/main/java/org/schema/Comment.java | 588 +++++++------- src/main/java/org/schema/CommentAction.java | 154 ++-- .../java/org/schema/CommunicateAction.java | 146 ++-- src/main/java/org/schema/CommunityHealth.java | 8 +- src/main/java/org/schema/Competitor.java | 4 + .../java/org/schema/CompilationAlbum.java | 8 +- src/main/java/org/schema/Completed.java | 8 +- .../org/schema/CompletedActionStatus.java | 8 +- src/main/java/org/schema/ComputerStore.java | 206 ++--- src/main/java/org/schema/ConfirmAction.java | 154 ++-- src/main/java/org/schema/ConsumeAction.java | 110 +-- src/main/java/org/schema/ContactPage.java | 620 +++++++-------- src/main/java/org/schema/ContactPoint.java | 114 +-- .../java/org/schema/ContactPointOption.java | 70 +- .../java/org/schema/ContactPointOrPlace.java | 9 +- src/main/java/org/schema/Continent.java | 182 ++--- src/main/java/org/schema/ControlAction.java | 102 +-- .../java/org/schema/ConvenienceStore.java | 206 ++--- src/main/java/org/schema/CookAction.java | 134 ++-- src/main/java/org/schema/Corporation.java | 298 +++---- src/main/java/org/schema/Country.java | 182 ++--- src/main/java/org/schema/Courthouse.java | 186 ++--- src/main/java/org/schema/CreateAction.java | 102 +-- src/main/java/org/schema/CreativeWork.java | 566 +++++++------- .../java/org/schema/CreativeWorkOrString.java | 9 +- .../java/org/schema/CreativeWorkSeason.java | 642 ++++++++-------- .../java/org/schema/CreativeWorkSeries.java | 568 +++++++------- src/main/java/org/schema/CreditCard.java | 70 +- src/main/java/org/schema/Crematorium.java | 186 ++--- src/main/java/org/schema/CrossSectional.java | 8 +- src/main/java/org/schema/DDxElement.java | 118 +-- src/main/java/org/schema/DJMixAlbum.java | 8 +- src/main/java/org/schema/DVDFormat.java | 8 +- .../java/org/schema/DamagedCondition.java | 8 +- src/main/java/org/schema/DanceEvent.java | 206 ++--- src/main/java/org/schema/DanceGroup.java | 294 +++---- src/main/java/org/schema/DataCatalog.java | 564 +++++++------- src/main/java/org/schema/DataDownload.java | 664 ++++++++-------- src/main/java/org/schema/DataType.java | 8 +- src/main/java/org/schema/Dataset.java | 586 +++++++------- src/main/java/org/schema/DatasetClass.java | 8 +- .../org/schema/DatedMoneySpecification.java | 92 +-- src/main/java/org/schema/DayOfWeek.java | 70 +- src/main/java/org/schema/DaySpa.java | 206 ++--- .../java/org/schema/DeactivateAction.java | 102 +-- .../java/org/schema/DefenceEstablishment.java | 186 ++--- src/main/java/org/schema/DeleteAction.java | 110 +-- .../schema/DeliveryChargeSpecification.java | 186 ++--- src/main/java/org/schema/DeliveryEvent.java | 230 +++--- src/main/java/org/schema/DeliveryMethod.java | 70 +- src/main/java/org/schema/Demand.java | 282 +++---- src/main/java/org/schema/DemoAlbum.java | 8 +- src/main/java/org/schema/Dentist.java | 206 ++--- src/main/java/org/schema/Dentistry.java | 8 +- src/main/java/org/schema/DepartAction.java | 118 +-- src/main/java/org/schema/DepartmentStore.java | 206 ++--- src/main/java/org/schema/Dermatologic.java | 8 +- src/main/java/org/schema/Diagnostic.java | 8 +- src/main/java/org/schema/DiagnosticLab.java | 214 +++--- .../java/org/schema/DiagnosticProcedure.java | 138 ++-- src/main/java/org/schema/Diet.java | 182 ++--- src/main/java/org/schema/DietNutrition.java | 8 +- .../java/org/schema/DietarySupplement.java | 206 ++--- .../org/schema/DigitalAudioTapeFormat.java | 8 +- src/main/java/org/schema/DigitalFormat.java | 8 +- src/main/java/org/schema/DisagreeAction.java | 102 +-- src/main/java/org/schema/Discontinued.java | 8 +- src/main/java/org/schema/DiscoverAction.java | 102 +-- src/main/java/org/schema/DislikeAction.java | 102 +-- src/main/java/org/schema/Distance.java | 54 +- .../schema/DistanceOrQuantitativeValue.java | 9 +- .../java/org/schema/DistanceOrString.java | 9 +- src/main/java/org/schema/DonateAction.java | 142 ++-- src/main/java/org/schema/DoseSchedule.java | 136 ++-- .../java/org/schema/DoubleBlindedTrial.java | 8 +- src/main/java/org/schema/DownloadAction.java | 118 +-- src/main/java/org/schema/DrawAction.java | 102 +-- src/main/java/org/schema/DrinkAction.java | 110 +-- .../schema/DriveWheelConfigurationValue.java | 166 ++-- .../DriveWheelConfigurationValueOrString.java | 9 +- .../org/schema/DrivingSchoolVehicleUsage.java | 8 +- src/main/java/org/schema/Drug.java | 286 +++---- src/main/java/org/schema/DrugClass.java | 150 ++-- src/main/java/org/schema/DrugCost.java | 138 ++-- .../java/org/schema/DrugCostCategory.java | 70 +- src/main/java/org/schema/DrugLegalStatus.java | 110 +-- .../org/schema/DrugPregnancyCategory.java | 70 +- .../org/schema/DrugPrescriptionStatus.java | 70 +- src/main/java/org/schema/DrugStrength.java | 140 ++-- .../java/org/schema/DryCleaningOrLaundry.java | 206 ++--- src/main/java/org/schema/Duration.java | 54 +- .../java/org/schema/DurationOrString.java | 9 +- src/main/java/org/schema/EBook.java | 8 +- src/main/java/org/schema/EPRelease.java | 8 +- src/main/java/org/schema/Ear.java | 8 +- src/main/java/org/schema/EatAction.java | 110 +-- src/main/java/org/schema/EducationEvent.java | 206 ++--- .../java/org/schema/EducationalAudience.java | 70 +- .../org/schema/EducationalOrganization.java | 302 ++++---- src/main/java/org/schema/Electrician.java | 206 ++--- .../java/org/schema/ElectronicsStore.java | 206 ++--- .../java/org/schema/ElementarySchool.java | 302 ++++---- src/main/java/org/schema/EmailMessage.java | 556 +++++++------- src/main/java/org/schema/Embassy.java | 186 ++--- src/main/java/org/schema/Emergency.java | 8 +- .../java/org/schema/EmergencyService.java | 206 ++--- src/main/java/org/schema/EmployeeRole.java | 88 ++- .../java/org/schema/EmploymentAgency.java | 206 ++--- src/main/java/org/schema/Endocrine.java | 8 +- src/main/java/org/schema/EndorseAction.java | 118 +-- src/main/java/org/schema/Energy.java | 54 +- .../java/org/schema/EngineSpecification.java | 66 +- .../org/schema/EnrollingByInvitation.java | 8 +- .../org/schema/EntertainmentBusiness.java | 206 ++--- src/main/java/org/schema/EntryPoint.java | 78 +- src/main/java/org/schema/Enumeration.java | 70 +- .../org/schema/EnumerationOrProperty.java | 9 +- ...eOrQuantitativeValueOrStructuredValue.java | 15 +- src/main/java/org/schema/Episode.java | 634 +++++++-------- src/main/java/org/schema/Event.java | 214 +++--- src/main/java/org/schema/EventCancelled.java | 8 +- src/main/java/org/schema/EventPostponed.java | 8 +- .../java/org/schema/EventRescheduled.java | 8 +- .../java/org/schema/EventReservation.java | 166 ++-- src/main/java/org/schema/EventScheduled.java | 8 +- src/main/java/org/schema/EventStatusType.java | 70 +- src/main/java/org/schema/EventVenue.java | 186 ++--- src/main/java/org/schema/EvidenceLevelA.java | 8 +- src/main/java/org/schema/EvidenceLevelB.java | 8 +- src/main/java/org/schema/EvidenceLevelC.java | 8 +- src/main/java/org/schema/ExerciseAction.java | 202 ++--- src/main/java/org/schema/ExerciseGym.java | 206 ++--- src/main/java/org/schema/ExercisePlan.java | 252 +++--- src/main/java/org/schema/Eye.java | 8 +- src/main/java/org/schema/FDAcategoryA.java | 8 +- src/main/java/org/schema/FDAcategoryB.java | 8 +- src/main/java/org/schema/FDAcategoryC.java | 8 +- src/main/java/org/schema/FDAcategoryD.java | 8 +- src/main/java/org/schema/FDAcategoryX.java | 8 +- src/main/java/org/schema/FDAnotEvaluated.java | 8 +- .../java/org/schema/FailedActionStatus.java | 8 +- .../java/org/schema/FastFoodRestaurant.java | 222 +++--- src/main/java/org/schema/Festival.java | 206 ++--- src/main/java/org/schema/FilmAction.java | 102 +-- .../java/org/schema/FinancialService.java | 206 ++--- src/main/java/org/schema/FindAction.java | 102 +-- src/main/java/org/schema/FireStation.java | 206 ++--- src/main/java/org/schema/Flexibility.java | 8 +- src/main/java/org/schema/Flight.java | 176 ++--- .../java/org/schema/FlightReservation.java | 190 ++--- src/main/java/org/schema/Florist.java | 206 ++--- src/main/java/org/schema/FollowAction.java | 118 +-- .../java/org/schema/FoodEstablishment.java | 222 +++--- .../org/schema/FoodEstablishmentOrPlace.java | 9 +- .../schema/FoodEstablishmentReservation.java | 204 ++--- src/main/java/org/schema/FoodEvent.java | 206 ++--- .../schema/FourWheelDriveConfiguration.java | 8 +- .../schema/FrontWheelDriveConfiguration.java | 8 +- src/main/java/org/schema/Fungus.java | 8 +- src/main/java/org/schema/FurnitureStore.java | 206 ++--- src/main/java/org/schema/Game.java | 608 +++++++-------- src/main/java/org/schema/GamePlayMode.java | 70 +- src/main/java/org/schema/GameServer.java | 84 +- .../java/org/schema/GameServerStatus.java | 70 +- src/main/java/org/schema/GardenStore.java | 206 ++--- src/main/java/org/schema/GasStation.java | 206 ++--- .../java/org/schema/Gastroenterologic.java | 8 +- .../org/schema/GatedResidenceCommunity.java | 182 ++--- .../java/org/schema/GeneralContractor.java | 206 ++--- src/main/java/org/schema/Genetic.java | 8 +- src/main/java/org/schema/Genitourinary.java | 8 +- src/main/java/org/schema/GeoCoordinates.java | 78 +- .../org/schema/GeoCoordinatesOrGeoShape.java | 9 +- src/main/java/org/schema/GeoShape.java | 78 +- .../org/schema/GeoShapeOrPlaceOrString.java | 11 +- src/main/java/org/schema/Geriatric.java | 8 +- src/main/java/org/schema/GiveAction.java | 142 ++-- src/main/java/org/schema/GolfCourse.java | 206 ++--- .../java/org/schema/GoodRelationsClass.java | 8 +- .../org/schema/GoodRelationsProperties.java | 8 +- .../java/org/schema/GovernmentBuilding.java | 186 ++--- .../java/org/schema/GovernmentOffice.java | 206 ++--- .../org/schema/GovernmentOrganization.java | 294 +++---- .../java/org/schema/GovernmentPermit.java | 102 +-- .../java/org/schema/GovernmentService.java | 122 +-- src/main/java/org/schema/GroceryStore.java | 206 ++--- .../java/org/schema/GroupBoardingPolicy.java | 8 +- src/main/java/org/schema/Gynecologic.java | 8 +- src/main/java/org/schema/HVACBusiness.java | 206 ++--- src/main/java/org/schema/HairSalon.java | 206 ++--- src/main/java/org/schema/Hardcover.java | 8 +- src/main/java/org/schema/HardwareStore.java | 206 ++--- src/main/java/org/schema/HasPart.java | 4 + src/main/java/org/schema/Head.java | 8 +- .../org/schema/HealthAndBeautyBusiness.java | 206 ++--- src/main/java/org/schema/HealthClub.java | 206 ++--- .../org/schema/HearingImpairedSupported.java | 8 +- src/main/java/org/schema/Hematologic.java | 8 +- src/main/java/org/schema/HighSchool.java | 302 ++++---- src/main/java/org/schema/HinduTemple.java | 186 ++--- src/main/java/org/schema/HobbyShop.java | 206 ++--- .../schema/HomeAndConstructionBusiness.java | 206 ++--- src/main/java/org/schema/HomeGoodsStore.java | 206 ++--- src/main/java/org/schema/Homeopathic.java | 8 +- src/main/java/org/schema/Hospital.java | 238 +++--- src/main/java/org/schema/Hostel.java | 206 ++--- src/main/java/org/schema/Hotel.java | 206 ++--- src/main/java/org/schema/HousePainter.java | 206 ++--- src/main/java/org/schema/IceCreamShop.java | 222 +++--- src/main/java/org/schema/IgnoreAction.java | 102 +-- src/main/java/org/schema/Image.java | 4 + src/main/java/org/schema/ImageGallery.java | 620 +++++++-------- src/main/java/org/schema/ImageObject.java | 692 ++++++++--------- .../org/schema/ImageObjectOrPhotograph.java | 9 +- .../java/org/schema/ImageObjectOrString.java | 9 +- src/main/java/org/schema/ImagingTest.java | 146 ++-- src/main/java/org/schema/InStock.java | 8 +- src/main/java/org/schema/InStoreOnly.java | 8 +- .../java/org/schema/IndividualProduct.java | 306 ++++---- src/main/java/org/schema/Infectious.java | 8 +- .../java/org/schema/InfectiousAgentClass.java | 70 +- .../java/org/schema/InfectiousDisease.java | 238 +++--- src/main/java/org/schema/InformAction.java | 154 ++-- src/main/java/org/schema/InsertAction.java | 118 +-- src/main/java/org/schema/InstallAction.java | 110 +-- src/main/java/org/schema/Instrument.java | 4 + src/main/java/org/schema/InsuranceAgency.java | 206 ++--- src/main/java/org/schema/Intangible.java | 54 +- src/main/java/org/schema/Integer.java | 43 -- src/main/java/org/schema/InteractAction.java | 102 +-- .../java/org/schema/InteractionCount.java | 8 +- .../java/org/schema/InternationalTrial.java | 8 +- src/main/java/org/schema/InternetCafe.java | 206 ++--- src/main/java/org/schema/InviteAction.java | 154 ++-- src/main/java/org/schema/Invoice.java | 170 ++-- src/main/java/org/schema/IsPartOf.java | 4 + .../java/org/schema/ItemAvailability.java | 70 +- src/main/java/org/schema/ItemList.java | 100 +-- .../org/schema/ItemListOrMusicRecording.java | 9 +- .../java/org/schema/ItemListOrString.java | 9 +- .../org/schema/ItemListOrderAscending.java | 8 +- .../org/schema/ItemListOrderDescending.java | 8 +- .../java/org/schema/ItemListOrderType.java | 70 +- .../org/schema/ItemListOrderTypeOrString.java | 9 +- .../java/org/schema/ItemListUnordered.java | 8 +- src/main/java/org/schema/ItemPage.java | 620 +++++++-------- src/main/java/org/schema/JewelryStore.java | 206 ++--- src/main/java/org/schema/JobPosting.java | 144 ++-- src/main/java/org/schema/JoinAction.java | 110 +-- src/main/java/org/schema/Joint.java | 170 ++-- src/main/java/org/schema/LRMIClass.java | 8 +- .../java/org/schema/LaboratoryScience.java | 8 +- src/main/java/org/schema/LakeBodyOfWater.java | 182 ++--- src/main/java/org/schema/Landform.java | 182 ++--- .../LandmarksOrHistoricalBuildings.java | 182 ++--- src/main/java/org/schema/Language.java | 54 +- .../java/org/schema/LanguageOrString.java | 9 +- src/main/java/org/schema/LaserDiscFormat.java | 8 +- src/main/java/org/schema/LeaveAction.java | 110 +-- src/main/java/org/schema/LeftHandDriving.java | 8 +- .../java/org/schema/LegislativeBuilding.java | 186 ++--- .../java/org/schema/LeisureTimeActivity.java | 8 +- src/main/java/org/schema/LendAction.java | 126 +-- src/main/java/org/schema/Library.java | 206 ++--- .../org/schema/LifestyleModification.java | 142 ++-- src/main/java/org/schema/Ligament.java | 158 ++-- src/main/java/org/schema/LikeAction.java | 102 +-- .../java/org/schema/LimitedAvailability.java | 8 +- src/main/java/org/schema/LiquorStore.java | 206 ++--- src/main/java/org/schema/ListItem.java | 78 +- .../org/schema/ListItemOrStringOrThing.java | 11 +- src/main/java/org/schema/ListenAction.java | 110 +-- src/main/java/org/schema/LiteraryEvent.java | 206 ++--- src/main/java/org/schema/LiveAlbum.java | 8 +- src/main/java/org/schema/LocalBusiness.java | 206 ++--- src/main/java/org/schema/Location.java | 4 + src/main/java/org/schema/LockerDelivery.java | 70 +- src/main/java/org/schema/Locksmith.java | 206 ++--- src/main/java/org/schema/LodgingBusiness.java | 206 ++--- .../java/org/schema/LodgingReservation.java | 256 ++++--- src/main/java/org/schema/Longitudinal.java | 8 +- src/main/java/org/schema/LoseAction.java | 110 +-- src/main/java/org/schema/Lung.java | 8 +- src/main/java/org/schema/LymphaticVessel.java | 190 ++--- src/main/java/org/schema/MBZ.java | 8 +- src/main/java/org/schema/MRI.java | 8 +- src/main/java/org/schema/Map.java | 564 +++++++------- src/main/java/org/schema/MapCategoryType.java | 70 +- src/main/java/org/schema/MapOrString.java | 9 +- src/main/java/org/schema/MarryAction.java | 102 +-- src/main/java/org/schema/Mass.java | 54 +- .../java/org/schema/MaximumDoseSchedule.java | 136 ++-- src/main/java/org/schema/MediaObject.java | 668 ++++++++-------- src/main/java/org/schema/MedicalAudience.java | 144 ++-- src/main/java/org/schema/MedicalCause.java | 110 +-- src/main/java/org/schema/MedicalClinic.java | 238 +++--- src/main/java/org/schema/MedicalCode.java | 110 +-- .../java/org/schema/MedicalCondition.java | 222 +++--- .../org/schema/MedicalConditionStage.java | 128 ++-- .../org/schema/MedicalContraindication.java | 102 +-- src/main/java/org/schema/MedicalDevice.java | 162 ++-- .../java/org/schema/MedicalDevicePurpose.java | 70 +- .../schema/MedicalDevicePurposeOrThing.java | 9 +- src/main/java/org/schema/MedicalEntity.java | 102 +-- .../java/org/schema/MedicalEnumeration.java | 70 +- .../java/org/schema/MedicalEvidenceLevel.java | 70 +- .../java/org/schema/MedicalGuideline.java | 128 ++-- .../MedicalGuidelineContraindication.java | 126 +-- .../MedicalGuidelineRecommendation.java | 130 ++-- .../org/schema/MedicalImagingTechnique.java | 70 +- .../java/org/schema/MedicalIndication.java | 102 +-- .../java/org/schema/MedicalIntangible.java | 102 +-- .../org/schema/MedicalObservationalStudy.java | 150 ++-- .../MedicalObservationalStudyDesign.java | 70 +- .../java/org/schema/MedicalOrganization.java | 206 ++--- .../java/org/schema/MedicalProcedure.java | 122 +-- ...rocedureOrMedicalTestOrMedicalTherapy.java | 11 +- .../java/org/schema/MedicalProcedureType.java | 70 +- .../java/org/schema/MedicalResearcher.java | 8 +- .../org/schema/MedicalRiskCalculator.java | 118 +-- .../java/org/schema/MedicalRiskEstimator.java | 118 +-- .../java/org/schema/MedicalRiskFactor.java | 110 +-- .../java/org/schema/MedicalRiskScore.java | 122 +-- .../org/schema/MedicalScholarlyArticle.java | 616 +++++++-------- src/main/java/org/schema/MedicalSign.java | 134 ++-- .../java/org/schema/MedicalSignOrSymptom.java | 118 +-- .../java/org/schema/MedicalSpecialty.java | 70 +- src/main/java/org/schema/MedicalStudy.java | 142 ++-- .../java/org/schema/MedicalStudyStatus.java | 70 +- src/main/java/org/schema/MedicalSymptom.java | 118 +-- src/main/java/org/schema/MedicalTest.java | 138 ++-- .../java/org/schema/MedicalTestPanel.java | 146 ++-- src/main/java/org/schema/MedicalTherapy.java | 142 ++-- src/main/java/org/schema/MedicalTrial.java | 154 ++-- .../java/org/schema/MedicalTrialDesign.java | 70 +- src/main/java/org/schema/MedicalWebPage.java | 624 +++++++-------- src/main/java/org/schema/MedicineSystem.java | 70 +- .../java/org/schema/MensClothingStore.java | 206 ++--- src/main/java/org/schema/MiddleSchool.java | 302 ++++---- src/main/java/org/schema/Midwifery.java | 8 +- src/main/java/org/schema/MixtapeAlbum.java | 8 +- .../java/org/schema/MobileApplication.java | 668 ++++++++-------- .../java/org/schema/MobilePhoneStore.java | 206 ++--- src/main/java/org/schema/Mosque.java | 186 ++--- src/main/java/org/schema/Motel.java | 206 ++--- .../java/org/schema/MotorcycleDealer.java | 206 ++--- .../java/org/schema/MotorcycleRepair.java | 206 ++--- src/main/java/org/schema/Mountain.java | 182 ++--- src/main/java/org/schema/MoveAction.java | 118 +-- src/main/java/org/schema/Movie.java | 624 +++++++-------- src/main/java/org/schema/MovieClip.java | 604 +++++++-------- .../java/org/schema/MovieRentalStore.java | 206 ++--- src/main/java/org/schema/MovieSeries.java | 604 +++++++-------- src/main/java/org/schema/MovieTheater.java | 228 +++--- src/main/java/org/schema/MovingCompany.java | 206 ++--- .../java/org/schema/MultiCenterTrial.java | 8 +- src/main/java/org/schema/MultiPlayer.java | 8 +- .../org/schema/MulticellularParasite.java | 8 +- src/main/java/org/schema/Muscle.java | 202 ++--- src/main/java/org/schema/Musculoskeletal.java | 8 +- .../java/org/schema/MusculoskeletalExam.java | 8 +- src/main/java/org/schema/Museum.java | 186 ++--- src/main/java/org/schema/MusicAlbum.java | 612 +++++++-------- .../org/schema/MusicAlbumProductionType.java | 70 +- .../org/schema/MusicAlbumReleaseType.java | 70 +- .../java/org/schema/MusicComposition.java | 624 +++++++-------- src/main/java/org/schema/MusicEvent.java | 206 ++--- src/main/java/org/schema/MusicGroup.java | 322 ++++---- .../java/org/schema/MusicGroupOrPerson.java | 9 +- src/main/java/org/schema/MusicPlaylist.java | 584 +++++++------- src/main/java/org/schema/MusicRecording.java | 600 ++++++++------- src/main/java/org/schema/MusicRelease.java | 632 +++++++-------- .../org/schema/MusicReleaseFormatType.java | 70 +- src/main/java/org/schema/MusicStore.java | 206 ++--- src/main/java/org/schema/MusicVenue.java | 186 ++--- .../java/org/schema/MusicVideoObject.java | 664 ++++++++-------- src/main/java/org/schema/NGO.java | 294 +++---- src/main/java/org/schema/NailSalon.java | 206 ++--- src/main/java/org/schema/Neck.java | 8 +- src/main/java/org/schema/Nerve.java | 198 ++--- src/main/java/org/schema/Neuro.java | 8 +- src/main/java/org/schema/Neurologic.java | 8 +- src/main/java/org/schema/NewCondition.java | 8 +- src/main/java/org/schema/NewsArticle.java | 632 +++++++-------- src/main/java/org/schema/NightClub.java | 206 ++--- .../java/org/schema/NoninvasiveProcedure.java | 8 +- src/main/java/org/schema/Nose.java | 8 +- .../java/org/schema/NotYetRecruiting.java | 8 +- src/main/java/org/schema/Notary.java | 206 ++--- src/main/java/org/schema/Number.java | 33 +- .../schema/NumberOrPriceSpecification.java | 9 +- .../NumberOrPriceSpecificationOrString.java | 11 +- .../org/schema/NumberOrQuantitativeValue.java | 9 +- src/main/java/org/schema/NumberOrString.java | 9 +- src/main/java/org/schema/Nursing.java | 8 +- .../java/org/schema/NutritionInformation.java | 146 ++-- src/main/java/org/schema/OTC.java | 8 +- src/main/java/org/schema/Observational.java | 8 +- src/main/java/org/schema/Obstetric.java | 8 +- .../java/org/schema/OccupationalActivity.java | 8 +- .../java/org/schema/OccupationalTherapy.java | 8 +- .../java/org/schema/OceanBodyOfWater.java | 182 ++--- src/main/java/org/schema/Offer.java | 344 +++++---- .../java/org/schema/OfferItemCondition.java | 70 +- .../java/org/schema/OfficeEquipmentStore.java | 206 ++--- .../java/org/schema/OfflinePermanently.java | 8 +- .../java/org/schema/OfflineTemporarily.java | 8 +- src/main/java/org/schema/OnDemandEvent.java | 218 +++--- src/main/java/org/schema/OnSitePickup.java | 8 +- src/main/java/org/schema/Oncologic.java | 8 +- src/main/java/org/schema/Online.java | 8 +- src/main/java/org/schema/OnlineFull.java | 8 +- src/main/java/org/schema/OnlineOnly.java | 8 +- src/main/java/org/schema/OpenTrial.java | 8 +- .../org/schema/OpeningHoursSpecification.java | 86 ++- src/main/java/org/schema/Optician.java | 206 ++--- src/main/java/org/schema/Optometic.java | 8 +- src/main/java/org/schema/Order.java | 202 ++--- src/main/java/org/schema/OrderAction.java | 126 +-- src/main/java/org/schema/OrderCancelled.java | 8 +- src/main/java/org/schema/OrderDelivered.java | 8 +- src/main/java/org/schema/OrderInTransit.java | 8 +- src/main/java/org/schema/OrderItem.java | 112 +-- .../java/org/schema/OrderItemOrProduct.java | 9 +- src/main/java/org/schema/OrderPaymentDue.java | 8 +- .../java/org/schema/OrderPickupAvailable.java | 8 +- src/main/java/org/schema/OrderProblem.java | 8 +- src/main/java/org/schema/OrderProcessing.java | 8 +- src/main/java/org/schema/OrderReturned.java | 8 +- src/main/java/org/schema/OrderStatus.java | 70 +- src/main/java/org/schema/Organization.java | 298 +++---- .../java/org/schema/OrganizationOrPerson.java | 9 +- .../OrganizationOrProgramMembership.java | 9 +- .../java/org/schema/OrganizationRole.java | 84 +- src/main/java/org/schema/OrganizeAction.java | 102 +-- src/main/java/org/schema/Osteopathic.java | 8 +- src/main/java/org/schema/Otolaryngologic.java | 8 +- src/main/java/org/schema/OutOfStock.java | 8 +- src/main/java/org/schema/OutletStore.java | 206 ++--- src/main/java/org/schema/OwnershipInfo.java | 90 +-- .../org/schema/OwnershipInfoOrProduct.java | 9 +- src/main/java/org/schema/PET.java | 8 +- src/main/java/org/schema/PaintAction.java | 102 +-- src/main/java/org/schema/Painting.java | 556 +++++++------- .../java/org/schema/PalliativeProcedure.java | 142 ++-- src/main/java/org/schema/Paperback.java | 8 +- src/main/java/org/schema/ParcelDelivery.java | 134 ++-- src/main/java/org/schema/ParcelService.java | 70 +- src/main/java/org/schema/ParentAudience.java | 188 ++--- src/main/java/org/schema/Park.java | 186 ++--- src/main/java/org/schema/ParkingFacility.java | 186 ++--- src/main/java/org/schema/ParkingMap.java | 8 +- src/main/java/org/schema/Participant.java | 4 + src/main/java/org/schema/Pathology.java | 8 +- src/main/java/org/schema/PathologyTest.java | 142 ++-- src/main/java/org/schema/Patient.java | 8 +- src/main/java/org/schema/PawnShop.java | 206 ++--- src/main/java/org/schema/PayAction.java | 158 ++-- .../schema/PaymentChargeSpecification.java | 154 ++-- src/main/java/org/schema/PaymentMethod.java | 70 +- src/main/java/org/schema/Pediatric.java | 8 +- src/main/java/org/schema/PeopleAudience.java | 152 ++-- .../org/schema/PercutaneousProcedure.java | 8 +- src/main/java/org/schema/PerformAction.java | 126 +-- src/main/java/org/schema/PerformanceRole.java | 66 +- .../org/schema/PerformingArtsTheater.java | 186 ++--- src/main/java/org/schema/PerformingGroup.java | 294 +++---- src/main/java/org/schema/Periodical.java | 568 +++++++------- src/main/java/org/schema/Permit.java | 106 +-- src/main/java/org/schema/Person.java | 406 +++++----- src/main/java/org/schema/PetStore.java | 206 ++--- src/main/java/org/schema/Pharmacy.java | 206 ++--- .../java/org/schema/PharmacySpecialty.java | 8 +- src/main/java/org/schema/Photograph.java | 556 +++++++------- .../java/org/schema/PhotographAction.java | 102 +-- .../java/org/schema/PhysicalActivity.java | 194 ++--- .../org/schema/PhysicalActivityCategory.java | 70 +- ...ysicalActivityCategoryOrStringOrThing.java | 11 +- src/main/java/org/schema/PhysicalExam.java | 70 +- src/main/java/org/schema/PhysicalTherapy.java | 142 ++-- src/main/java/org/schema/Physician.java | 246 +++--- src/main/java/org/schema/Physiotherapy.java | 8 +- src/main/java/org/schema/Place.java | 182 ++--- src/main/java/org/schema/PlaceOfWorship.java | 186 ++--- .../schema/PlaceOrPostalAddressOrString.java | 11 +- .../org/schema/PlaceboControlledTrial.java | 8 +- src/main/java/org/schema/PlanAction.java | 108 +-- src/main/java/org/schema/PlasticSurgery.java | 8 +- src/main/java/org/schema/PlayAction.java | 118 +-- src/main/java/org/schema/Playground.java | 186 ++--- src/main/java/org/schema/Plumber.java | 206 ++--- src/main/java/org/schema/Podiatric.java | 8 +- src/main/java/org/schema/PoliceStation.java | 206 ++--- src/main/java/org/schema/Pond.java | 182 ++--- src/main/java/org/schema/Position.java | 4 + src/main/java/org/schema/PostOffice.java | 206 ++--- src/main/java/org/schema/PostalAddress.java | 142 ++-- .../org/schema/PotentialActionStatus.java | 8 +- src/main/java/org/schema/PreOrder.java | 8 +- src/main/java/org/schema/PrependAction.java | 118 +-- src/main/java/org/schema/Preschool.java | 302 ++++---- .../java/org/schema/PrescriptionOnly.java | 8 +- .../java/org/schema/PreventionIndication.java | 102 +-- .../java/org/schema/PriceSpecification.java | 142 ++-- src/main/java/org/schema/PrimaryCare.java | 8 +- src/main/java/org/schema/Prion.java | 8 +- src/main/java/org/schema/Product.java | 312 ++++---- src/main/java/org/schema/ProductModel.java | 330 ++++---- .../java/org/schema/ProductModelOrString.java | 9 +- src/main/java/org/schema/ProductOrString.java | 9 +- .../java/org/schema/ProfessionalService.java | 206 ++--- src/main/java/org/schema/ProfilePage.java | 620 +++++++-------- .../java/org/schema/ProgramMembership.java | 70 +- src/main/java/org/schema/Project.java | 54 +- src/main/java/org/schema/Property.java | 78 +- src/main/java/org/schema/PropertyValue.java | 148 ++-- .../org/schema/PropertyValueOrString.java | 9 +- .../schema/PropertyValueSpecification.java | 174 +++-- src/main/java/org/schema/Protozoa.java | 8 +- src/main/java/org/schema/Psychiatric.java | 8 +- .../org/schema/PsychologicalTreatment.java | 142 ++-- src/main/java/org/schema/PublicHealth.java | 8 +- .../java/org/schema/PublicSwimmingPool.java | 206 ++--- .../java/org/schema/PublicationEvent.java | 218 +++--- .../java/org/schema/PublicationIssue.java | 626 +++++++-------- .../java/org/schema/PublicationVolume.java | 626 +++++++-------- src/main/java/org/schema/Pulmonary.java | 8 +- src/main/java/org/schema/QAPage.java | 620 +++++++-------- .../java/org/schema/QualitativeValue.java | 166 ++-- .../org/schema/QualitativeValueOrString.java | 9 +- .../java/org/schema/QuantitativeValue.java | 174 +++-- ...Value.java => QuantitativeValueOrInt.java} | 19 +- src/main/java/org/schema/Quantity.java | 54 +- src/main/java/org/schema/Question.java | 604 +++++++-------- src/main/java/org/schema/QuoteAction.java | 118 +-- src/main/java/org/schema/RNews.java | 8 +- src/main/java/org/schema/RVPark.java | 186 ++--- .../java/org/schema/RadiationTherapy.java | 142 ++-- src/main/java/org/schema/RadioChannel.java | 78 +- src/main/java/org/schema/RadioClip.java | 604 +++++++-------- src/main/java/org/schema/RadioEpisode.java | 630 +++++++-------- src/main/java/org/schema/RadioSeason.java | 630 +++++++-------- src/main/java/org/schema/RadioSeries.java | 644 ++++++++-------- src/main/java/org/schema/RadioStation.java | 206 ++--- src/main/java/org/schema/Radiograpy.java | 8 +- src/main/java/org/schema/RandomizedTrial.java | 8 +- src/main/java/org/schema/Rating.java | 74 +- src/main/java/org/schema/ReactAction.java | 102 +-- src/main/java/org/schema/ReadAction.java | 110 +-- src/main/java/org/schema/RealEstateAgent.java | 206 ++--- .../schema/RearWheelDriveConfiguration.java | 8 +- src/main/java/org/schema/ReceiveAction.java | 150 ++-- src/main/java/org/schema/Recipe.java | 620 +++++++-------- .../org/schema/RecommendedDoseSchedule.java | 136 ++-- src/main/java/org/schema/Recruiting.java | 8 +- src/main/java/org/schema/RecyclingCenter.java | 206 ++--- .../java/org/schema/RefurbishedCondition.java | 8 +- src/main/java/org/schema/RegisterAction.java | 102 +-- src/main/java/org/schema/Registry.java | 8 +- .../java/org/schema/ReimbursementCap.java | 8 +- src/main/java/org/schema/RejectAction.java | 118 +-- src/main/java/org/schema/RemixAlbum.java | 8 +- src/main/java/org/schema/Renal.java | 8 +- src/main/java/org/schema/RentAction.java | 142 ++-- .../java/org/schema/RentalCarReservation.java | 194 ++--- .../java/org/schema/RentalVehicleUsage.java | 8 +- src/main/java/org/schema/ReplaceAction.java | 126 +-- src/main/java/org/schema/ReplyAction.java | 154 ++-- .../java/org/schema/ReportedDoseSchedule.java | 136 ++-- src/main/java/org/schema/Researcher.java | 8 +- src/main/java/org/schema/Reservation.java | 170 ++-- .../java/org/schema/ReservationCancelled.java | 8 +- .../java/org/schema/ReservationConfirmed.java | 8 +- src/main/java/org/schema/ReservationHold.java | 8 +- .../java/org/schema/ReservationPackage.java | 174 +++-- .../java/org/schema/ReservationPending.java | 8 +- .../org/schema/ReservationStatusType.java | 70 +- src/main/java/org/schema/ReserveAction.java | 106 +-- src/main/java/org/schema/Reservoir.java | 182 ++--- src/main/java/org/schema/Residence.java | 182 ++--- .../java/org/schema/RespiratoryTherapy.java | 8 +- src/main/java/org/schema/Restaurant.java | 222 +++--- src/main/java/org/schema/Result.java | 4 + .../java/org/schema/ResultsAvailable.java | 8 +- .../java/org/schema/ResultsNotAvailable.java | 8 +- src/main/java/org/schema/ResumeAction.java | 102 +-- src/main/java/org/schema/Retail.java | 8 +- src/main/java/org/schema/ReturnAction.java | 142 ++-- src/main/java/org/schema/Review.java | 576 +++++++------- src/main/java/org/schema/ReviewAction.java | 110 +-- src/main/java/org/schema/Rheumatologic.java | 8 +- .../java/org/schema/RightHandDriving.java | 8 +- .../java/org/schema/RiverBodyOfWater.java | 182 ++--- src/main/java/org/schema/Role.java | 64 +- .../java/org/schema/RoofingContractor.java | 206 ++--- src/main/java/org/schema/RsvpAction.java | 192 ++--- .../java/org/schema/RsvpResponseMaybe.java | 8 +- src/main/java/org/schema/RsvpResponseNo.java | 8 +- .../java/org/schema/RsvpResponseType.java | 70 +- src/main/java/org/schema/RsvpResponseYes.java | 8 +- src/main/java/org/schema/SaleEvent.java | 206 ++--- src/main/java/org/schema/ScheduleAction.java | 106 +-- src/main/java/org/schema/SchemaOrg.java | 4 - .../java/org/schema/ScholarlyArticle.java | 612 +++++++-------- src/main/java/org/schema/School.java | 302 ++++---- src/main/java/org/schema/ScreeningEvent.java | 230 +++--- src/main/java/org/schema/Sculpture.java | 556 +++++++------- src/main/java/org/schema/SeaBodyOfWater.java | 182 ++--- src/main/java/org/schema/SearchAction.java | 106 +-- .../java/org/schema/SearchResultsPage.java | 620 +++++++-------- src/main/java/org/schema/Season.java | 556 +++++++------- src/main/java/org/schema/Seat.java | 78 +- src/main/java/org/schema/SeatingMap.java | 8 +- src/main/java/org/schema/SelfStorage.java | 206 ++--- src/main/java/org/schema/SellAction.java | 126 +-- src/main/java/org/schema/SendAction.java | 150 ++-- src/main/java/org/schema/SerialNumber.java | 4 + src/main/java/org/schema/Series.java | 556 +++++++------- src/main/java/org/schema/Service.java | 114 +-- src/main/java/org/schema/ServiceChannel.java | 114 +-- src/main/java/org/schema/ShareAction.java | 146 ++-- src/main/java/org/schema/ShoeStore.java | 206 ++--- src/main/java/org/schema/ShoppingCenter.java | 206 ++--- .../java/org/schema/SingleBlindedTrial.java | 8 +- .../java/org/schema/SingleCenterTrial.java | 8 +- .../org/schema/SingleFamilyResidence.java | 182 ++--- src/main/java/org/schema/SinglePlayer.java | 8 +- src/main/java/org/schema/SingleRelease.java | 8 +- .../org/schema/SiteNavigationElement.java | 556 +++++++------- src/main/java/org/schema/SkiResort.java | 206 ++--- src/main/java/org/schema/Skin.java | 8 +- src/main/java/org/schema/SocialEvent.java | 206 ++--- .../java/org/schema/SoftwareApplication.java | 668 ++++++++-------- .../org/schema/SoftwareApplicationBuild.java | 680 ++++++++-------- .../java/org/schema/SoftwareSourceCode.java | 584 +++++++------- src/main/java/org/schema/SoldOut.java | 8 +- src/main/java/org/schema/SomeProducts.java | 314 ++++---- src/main/java/org/schema/SoundtrackAlbum.java | 8 +- src/main/java/org/schema/Specialty.java | 70 +- src/main/java/org/schema/SpeechPathology.java | 8 +- src/main/java/org/schema/SpokenWordAlbum.java | 8 +- .../java/org/schema/SportingGoodsStore.java | 206 ++--- .../org/schema/SportsActivityLocation.java | 206 ++--- src/main/java/org/schema/SportsClub.java | 206 ++--- src/main/java/org/schema/SportsEvent.java | 218 +++--- .../java/org/schema/SportsOrganization.java | 298 +++---- src/main/java/org/schema/SportsTeam.java | 314 ++++---- src/main/java/org/schema/StackExchange.java | 8 +- src/main/java/org/schema/StadiumOrArena.java | 206 ++--- src/main/java/org/schema/State.java | 182 ++--- .../org/schema/SteeringPositionValue.java | 166 ++-- src/main/java/org/schema/Store.java | 206 ++--- .../java/org/schema/StrengthTraining.java | 8 +- ...{IntegerOrString.java => StringOrInt.java} | 19 +- src/main/java/org/schema/StringOrThing.java | 9 +- src/main/java/org/schema/StringOrVehicle.java | 9 +- src/main/java/org/schema/StructuredValue.java | 54 +- src/main/java/org/schema/StudioAlbum.java | 8 +- src/main/java/org/schema/SubscribeAction.java | 102 +-- src/main/java/org/schema/SubwayStation.java | 186 ++--- src/main/java/org/schema/SuggestedAnswer.java | 4 + .../java/org/schema/SuperficialAnatomy.java | 142 ++-- src/main/java/org/schema/Surgical.java | 8 +- .../java/org/schema/SurgicalProcedure.java | 8 +- src/main/java/org/schema/SuspendAction.java | 102 +-- src/main/java/org/schema/Suspended.java | 8 +- src/main/java/org/schema/Synagogue.java | 186 ++--- src/main/java/org/schema/TVClip.java | 604 +++++++-------- src/main/java/org/schema/TVEpisode.java | 642 ++++++++-------- src/main/java/org/schema/TVSeason.java | 630 +++++++-------- src/main/java/org/schema/TVSeries.java | 644 ++++++++-------- src/main/java/org/schema/Table.java | 556 +++++++------- src/main/java/org/schema/TakeAction.java | 118 +-- src/main/java/org/schema/TattooParlor.java | 206 ++--- src/main/java/org/schema/Taxi.java | 114 +-- src/main/java/org/schema/TaxiReservation.java | 212 ++--- src/main/java/org/schema/TaxiService.java | 114 +-- src/main/java/org/schema/TaxiStand.java | 186 ++--- .../java/org/schema/TaxiVehicleUsage.java | 8 +- src/main/java/org/schema/TechArticle.java | 620 +++++++-------- .../java/org/schema/TelevisionChannel.java | 78 +- .../java/org/schema/TelevisionStation.java | 210 ++--- src/main/java/org/schema/TennisComplex.java | 206 ++--- src/main/java/org/schema/Terminated.java | 8 +- src/main/java/org/schema/TheaterEvent.java | 206 ++--- src/main/java/org/schema/TheaterGroup.java | 294 +++---- src/main/java/org/schema/Therapeutic.java | 8 +- .../java/org/schema/TherapeuticProcedure.java | 142 ++-- src/main/java/org/schema/Thing.java | 62 +- src/main/java/org/schema/Throat.java | 8 +- src/main/java/org/schema/Ticket.java | 120 +-- src/main/java/org/schema/TieAction.java | 102 +-- src/main/java/org/schema/TipAction.java | 142 ++-- src/main/java/org/schema/TireShop.java | 206 ++--- src/main/java/org/schema/TollFree.java | 8 +- .../java/org/schema/TouristAttraction.java | 182 ++--- .../org/schema/TouristInformationCenter.java | 206 ++--- src/main/java/org/schema/Toxicologic.java | 8 +- src/main/java/org/schema/ToyStore.java | 206 ++--- src/main/java/org/schema/TrackAction.java | 110 +-- src/main/java/org/schema/TradeAction.java | 118 +-- .../java/org/schema/TraditionalChinese.java | 8 +- .../java/org/schema/TrainReservation.java | 166 ++-- src/main/java/org/schema/TrainStation.java | 186 ++--- src/main/java/org/schema/TrainTrip.java | 114 +-- src/main/java/org/schema/TransferAction.java | 118 +-- src/main/java/org/schema/TransitMap.java | 8 +- src/main/java/org/schema/TravelAction.java | 126 +-- src/main/java/org/schema/TravelAgency.java | 206 ++--- .../java/org/schema/TreatmentIndication.java | 102 +-- .../java/org/schema/TripleBlindedTrial.java | 8 +- .../java/org/schema/TypeAndQuantityNode.java | 100 +-- src/main/java/org/schema/Ultrasound.java | 8 +- .../java/org/schema/UnRegisterAction.java | 102 +-- .../org/schema/UnitPriceSpecification.java | 172 +++-- src/main/java/org/schema/UpdateAction.java | 110 +-- src/main/java/org/schema/Urologic.java | 8 +- src/main/java/org/schema/UseAction.java | 110 +-- src/main/java/org/schema/UsedCondition.java | 8 +- src/main/java/org/schema/UserBlocks.java | 206 ++--- src/main/java/org/schema/UserCheckins.java | 206 ++--- src/main/java/org/schema/UserComments.java | 244 +++--- src/main/java/org/schema/UserDownloads.java | 206 ++--- src/main/java/org/schema/UserInteraction.java | 206 ++--- src/main/java/org/schema/UserLikes.java | 206 ++--- src/main/java/org/schema/UserPageVisits.java | 206 ++--- src/main/java/org/schema/UserPlays.java | 206 ++--- src/main/java/org/schema/UserPlusOnes.java | 206 ++--- src/main/java/org/schema/UserTweets.java | 206 ++--- src/main/java/org/schema/Vehicle.java | 494 ++++++------ .../java/org/schema/VehicleSpecialUsage.java | 8 +- src/main/java/org/schema/Vein.java | 190 ++--- src/main/java/org/schema/VenueMap.java | 8 +- src/main/java/org/schema/Vessel.java | 158 ++-- src/main/java/org/schema/VeterinaryCare.java | 206 ++--- src/main/java/org/schema/VideoGallery.java | 620 +++++++-------- src/main/java/org/schema/VideoGame.java | 684 +++++++++-------- src/main/java/org/schema/VideoGameClip.java | 604 +++++++-------- src/main/java/org/schema/VideoGameSeries.java | 724 +++++++++--------- src/main/java/org/schema/VideoObject.java | 720 ++++++++--------- src/main/java/org/schema/ViewAction.java | 110 +-- src/main/java/org/schema/VinylFormat.java | 8 +- src/main/java/org/schema/Virus.java | 8 +- src/main/java/org/schema/VisualArtsEvent.java | 206 ++--- src/main/java/org/schema/VisualArtwork.java | 638 +++++++-------- src/main/java/org/schema/VitalSign.java | 8 +- src/main/java/org/schema/Volcano.java | 182 ++--- src/main/java/org/schema/VoteAction.java | 122 +-- src/main/java/org/schema/WPAdBlock.java | 556 +++++++------- src/main/java/org/schema/WPFooter.java | 556 +++++++------- src/main/java/org/schema/WPHeader.java | 556 +++++++------- src/main/java/org/schema/WPSideBar.java | 556 +++++++------- src/main/java/org/schema/WantAction.java | 102 +-- src/main/java/org/schema/WarrantyPromise.java | 70 +- src/main/java/org/schema/WarrantyScope.java | 70 +- src/main/java/org/schema/WatchAction.java | 110 +-- src/main/java/org/schema/Waterfall.java | 182 ++--- src/main/java/org/schema/WearAction.java | 110 +-- src/main/java/org/schema/WebApplication.java | 668 ++++++++-------- src/main/java/org/schema/WebPage.java | 622 +++++++-------- src/main/java/org/schema/WebPageElement.java | 556 +++++++------- src/main/java/org/schema/WebSite.java | 556 +++++++------- .../java/org/schema/WesternConventional.java | 8 +- src/main/java/org/schema/Wholesale.java | 8 +- src/main/java/org/schema/WholesaleStore.java | 206 ++--- src/main/java/org/schema/WikiDoc.java | 8 +- src/main/java/org/schema/WinAction.java | 110 +-- src/main/java/org/schema/Winery.java | 222 +++--- src/main/java/org/schema/Withdrawn.java | 8 +- src/main/java/org/schema/WriteAction.java | 114 +-- src/main/java/org/schema/XRay.java | 8 +- .../java/org/schema/ZoneBoardingPolicy.java | 8 +- src/main/java/org/schema/Zoo.java | 186 ++--- 921 files changed, 72705 insertions(+), 69130 deletions(-) delete mode 100644 src/main/java/org/schema/Integer.java rename src/main/java/org/schema/{IntegerOrQuantitativeValue.java => QuantitativeValueOrInt.java} (73%) rename src/main/java/org/schema/{IntegerOrString.java => StringOrInt.java} (68%) diff --git a/src/main/java/org/schema/APIReference.java b/src/main/java/org/schema/APIReference.java index 4051a5df..216314fc 100644 --- a/src/main/java/org/schema/APIReference.java +++ b/src/main/java/org/schema/APIReference.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Reference documentation for application programming interfaces (APIs). */ @@ -49,7 +53,7 @@ public String getTargetPlatform() { /** * Builder for {@link APIReference} */ - public static final class APIReferenceThingBuilder implements Builder { + static final class APIReferenceThingBuilder implements Builder { /** * Creates new {@link APIReference} instance. */ @@ -59,229 +63,229 @@ public APIReference build() { /** * Library file name e.g., mscorlib.dll, system.web.dll. */ - public Builder executableLibraryName(String executableLibraryName) { + @NotNull public Builder executableLibraryName(String executableLibraryName) { this.executableLibraryName = executableLibraryName; return this; } /** * Associated product/technology version. e.g., .NET Framework 4.5. */ - public Builder assemblyVersion(String assemblyVersion) { + @NotNull public Builder assemblyVersion(String assemblyVersion) { this.assemblyVersion = assemblyVersion; return this; } /** * Indicates whether API is managed or unmanaged. */ - public Builder programmingModel(String programmingModel) { + @NotNull public Builder programmingModel(String programmingModel) { this.programmingModel = programmingModel; return this; } /** * Type of app development: phone, Metro style, desktop, XBox, etc. */ - public Builder targetPlatform(String targetPlatform) { + @NotNull public Builder targetPlatform(String targetPlatform) { this.targetPlatform = targetPlatform; return this; } /** * Prerequisites needed to fulfill steps in article. */ - public Builder dependencies(String dependencies) { + @NotNull public Builder dependencies(String dependencies) { this.dependencies = dependencies; return this; } /** * Proficiency needed for this content; expected values: 'Beginner', 'Expert'. */ - public Builder proficiencyLevel(String proficiencyLevel) { + @NotNull public Builder proficiencyLevel(String proficiencyLevel) { this.proficiencyLevel = proficiencyLevel; return this; } /** * The actual body of the article. */ - public Builder articleBody(String articleBody) { + @NotNull public Builder articleBody(String articleBody) { this.articleBody = articleBody; return this; } /** * Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. */ - public Builder articleSection(String articleSection) { + @NotNull public Builder articleSection(String articleSection) { this.articleSection = articleSection; return this; } /** * The number of words in the text of the Article. */ - public Builder wordCount(Integer integer) { - this.wordCount = integer; + @NotNull public Builder wordCount(int wordCount) { + this.wordCount = wordCount; return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -289,13 +293,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -303,20 +307,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -324,13 +328,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -338,40 +342,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -379,13 +383,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -393,13 +397,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -407,13 +411,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -421,21 +425,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -459,7 +463,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -467,7 +471,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -475,13 +479,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -489,101 +493,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -591,13 +595,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -605,35 +609,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -641,13 +645,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -655,53 +659,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -709,13 +713,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -723,127 +727,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -851,7 +855,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -859,7 +863,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -867,7 +871,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -875,20 +879,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -896,13 +900,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -910,66 +914,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -977,13 +981,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -991,40 +995,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1058,7 +1062,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1093,7 +1097,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1126,7 +1130,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1134,38 +1138,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1180,9 +1184,9 @@ public Builder id(long id) { private String proficiencyLevel; private String articleBody; private String articleSection; - private Integer wordCount; - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private int wordCount; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; private String schemaVersion; private Thing about; @@ -1240,7 +1244,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1258,158 +1262,158 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder executableLibraryName(String executableLibraryName); - Builder assemblyVersion(String assemblyVersion); - Builder programmingModel(String programmingModel); - Builder targetPlatform(String targetPlatform); - Builder dependencies(String dependencies); - Builder proficiencyLevel(String proficiencyLevel); - Builder articleBody(String articleBody); - Builder articleSection(String articleSection); - Builder wordCount(Integer integer); - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder executableLibraryName(String executableLibraryName); + @NotNull Builder assemblyVersion(String assemblyVersion); + @NotNull Builder programmingModel(String programmingModel); + @NotNull Builder targetPlatform(String targetPlatform); + @NotNull Builder dependencies(String dependencies); + @NotNull Builder proficiencyLevel(String proficiencyLevel); + @NotNull Builder articleBody(String articleBody); + @NotNull Builder articleSection(String articleSection); + @NotNull Builder wordCount(int wordCount); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected APIReference(String executableLibraryName, String assemblyVersion, String programmingModel, String targetPlatform, String dependencies, String proficiencyLevel, 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) { + protected APIReference(String executableLibraryName, String assemblyVersion, String programmingModel, String targetPlatform, String dependencies, String proficiencyLevel, String articleBody, String articleSection, int wordCount, StringOrInt pageEnd, StringOrInt 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, int 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(dependencies, proficiencyLevel, 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); myExecutableLibraryName = executableLibraryName; myAssemblyVersion = assemblyVersion; diff --git a/src/main/java/org/schema/Abdomen.java b/src/main/java/org/schema/Abdomen.java index 59c4556a..03dab0fa 100644 --- a/src/main/java/org/schema/Abdomen.java +++ b/src/main/java/org/schema/Abdomen.java @@ -25,7 +25,7 @@ public class Abdomen { /** * Builder for {@link Abdomen} */ - public static final class AbdomenThingBuilder implements Builder { + static final class AbdomenThingBuilder implements Builder { /** * Creates new {@link Abdomen} instance. */ @@ -34,7 +34,7 @@ public Abdomen build() { } } public interface Builder extends ThingBuilder { - + } protected Abdomen() { diff --git a/src/main/java/org/schema/AboutPage.java b/src/main/java/org/schema/AboutPage.java index 9131e0d6..317ef5e9 100644 --- a/src/main/java/org/schema/AboutPage.java +++ b/src/main/java/org/schema/AboutPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web page type: About page. */ @@ -25,7 +29,7 @@ public class AboutPage extends WebPage { /** * Builder for {@link AboutPage} */ - public static final class AboutPageThingBuilder implements Builder { + static final class AboutPageThingBuilder implements Builder { /** * Creates new {@link AboutPage} instance. */ @@ -35,7 +39,7 @@ public AboutPage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/AcceptAction.java b/src/main/java/org/schema/AcceptAction.java index 49ba3a65..71a7edbf 100644 --- a/src/main/java/org/schema/AcceptAction.java +++ b/src/main/java/org/schema/AcceptAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of committing to/adopting an object.

Related actions:

. */ @@ -25,7 +29,7 @@ public class AcceptAction extends AllocateAction { /** * Builder for {@link AcceptAction} */ - public static final class AcceptActionThingBuilder implements Builder { + static final class AcceptActionThingBuilder implements Builder { /** * Creates new {@link AcceptAction} instance. */ @@ -35,7 +39,7 @@ public AcceptAction build() { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setMedicalDevicePurpose(medicalDevicePurpose); return this; @@ -43,13 +47,13 @@ public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { return this.purpose(medicalDevicePurpose.build()); } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing thing) { + @NotNull public Builder purpose(Thing thing) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setThing(thing); return this; @@ -57,13 +61,13 @@ public Builder purpose(Thing thing) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing.Builder thing) { + @NotNull public Builder purpose(Thing.Builder thing) { return this.purpose(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -71,13 +75,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -85,7 +89,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -93,7 +97,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -102,67 +106,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -196,7 +200,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -231,7 +235,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -264,7 +268,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -272,38 +276,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -328,34 +332,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder purpose(MedicalDevicePurpose medicalDevicePurpose); - Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); - Builder purpose(Thing thing); - Builder purpose(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder purpose(MedicalDevicePurpose medicalDevicePurpose); + @NotNull Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); + @NotNull Builder purpose(Thing thing); + @NotNull Builder purpose(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AccountingService.java b/src/main/java/org/schema/AccountingService.java index 8db07522..b6bc4c6a 100644 --- a/src/main/java/org/schema/AccountingService.java +++ b/src/main/java/org/schema/AccountingService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Accountancy business. */ @@ -25,7 +29,7 @@ public class AccountingService extends ProfessionalService { /** * Builder for {@link AccountingService} */ - public static final class AccountingServiceThingBuilder implements Builder { + static final class AccountingServiceThingBuilder implements Builder { /** * Creates new {@link AccountingService} instance. */ @@ -35,107 +39,107 @@ public AccountingService build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AchieveAction.java b/src/main/java/org/schema/AchieveAction.java index 230a95fb..83b4f292 100644 --- a/src/main/java/org/schema/AchieveAction.java +++ b/src/main/java/org/schema/AchieveAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of accomplishing something via previous efforts. It is an instantaneous action rather than an ongoing process. */ @@ -25,7 +29,7 @@ public class AchieveAction extends Action { /** * Builder for {@link AchieveAction} */ - public static final class AchieveActionThingBuilder implements Builder { + static final class AchieveActionThingBuilder implements Builder { /** * Creates new {@link AchieveAction} instance. */ @@ -35,7 +39,7 @@ public AchieveAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Action.java b/src/main/java/org/schema/Action.java index 4e5b95c8..f2dc7df8 100644 --- a/src/main/java/org/schema/Action.java +++ b/src/main/java/org/schema/Action.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An action performed by a direct agent and indirect participants upon a direct object. Optionally happens at a location with the help of an inanimate instrument. The execution of the action may produce a result. Specific action sub-type documentation specifies the exact expectation of each argument/role. *

See also blog post @@ -36,7 +40,7 @@ public OrganizationOrPerson getAgent() { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getEndTime() { return myEndTime; } @@ -45,7 +49,7 @@ public java.util.Date getEndTime() { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getStartTime() { return myStartTime; } @@ -70,7 +74,7 @@ public EntryPoint getTarget() { /** * Builder for {@link Action} */ - public static final class ActionThingBuilder implements Builder { + static final class ActionThingBuilder implements Builder { /** * Creates new {@link Action} instance. */ @@ -80,7 +84,7 @@ public Action build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -88,13 +92,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -102,7 +106,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -110,7 +114,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -119,67 +123,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -213,7 +217,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -248,7 +252,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -281,7 +285,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -289,38 +293,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -344,30 +348,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Action(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) { diff --git a/src/main/java/org/schema/ActionCollabClass.java b/src/main/java/org/schema/ActionCollabClass.java index bcbab1b6..f8f710e3 100644 --- a/src/main/java/org/schema/ActionCollabClass.java +++ b/src/main/java/org/schema/ActionCollabClass.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The schema.org Actions mechanism benefited from extensive discussions across the Web standards community around W3C, in particular from the Hydra project's community group. */ @@ -25,7 +29,7 @@ public class ActionCollabClass { /** * Builder for {@link ActionCollabClass} */ - public static final class ActionCollabClassThingBuilder implements Builder { + static final class ActionCollabClassThingBuilder implements Builder { /** * Creates new {@link ActionCollabClass} instance. */ @@ -34,7 +38,7 @@ public ActionCollabClass build() { } } public interface Builder extends ThingBuilder { - + } protected ActionCollabClass() { diff --git a/src/main/java/org/schema/ActionStatusType.java b/src/main/java/org/schema/ActionStatusType.java index aecbb884..9d626d1f 100644 --- a/src/main/java/org/schema/ActionStatusType.java +++ b/src/main/java/org/schema/ActionStatusType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The status of an Action. */ @@ -25,7 +29,7 @@ public class ActionStatusType extends Enumeration { /** * Builder for {@link ActionStatusType} */ - public static final class ActionStatusTypeThingBuilder implements Builder { + static final class ActionStatusTypeThingBuilder implements Builder { /** * Creates new {@link ActionStatusType} instance. */ @@ -35,7 +39,7 @@ public ActionStatusType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ActionStatusType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ActivateAction.java b/src/main/java/org/schema/ActivateAction.java index 2394cc69..30136b5d 100644 --- a/src/main/java/org/schema/ActivateAction.java +++ b/src/main/java/org/schema/ActivateAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of starting or activating a device or application (e.g. starting a timer or turning on a flashlight). */ @@ -25,7 +29,7 @@ public class ActivateAction extends ControlAction { /** * Builder for {@link ActivateAction} */ - public static final class ActivateActionThingBuilder implements Builder { + static final class ActivateActionThingBuilder implements Builder { /** * Creates new {@link ActivateAction} instance. */ @@ -35,7 +39,7 @@ public ActivateAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ActiveActionStatus.java b/src/main/java/org/schema/ActiveActionStatus.java index 52f2698e..437bde8d 100644 --- a/src/main/java/org/schema/ActiveActionStatus.java +++ b/src/main/java/org/schema/ActiveActionStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An in-progress action (e.g, while watching the movie, or driving to a location). */ @@ -25,7 +29,7 @@ public class ActiveActionStatus { /** * Builder for {@link ActiveActionStatus} */ - public static final class ActiveActionStatusThingBuilder implements Builder { + static final class ActiveActionStatusThingBuilder implements Builder { /** * Creates new {@link ActiveActionStatus} instance. */ @@ -34,7 +38,7 @@ public ActiveActionStatus build() { } } public interface Builder extends ThingBuilder { - + } protected ActiveActionStatus() { diff --git a/src/main/java/org/schema/ActiveNotRecruiting.java b/src/main/java/org/schema/ActiveNotRecruiting.java index 5f215519..ac861a1b 100644 --- a/src/main/java/org/schema/ActiveNotRecruiting.java +++ b/src/main/java/org/schema/ActiveNotRecruiting.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Active, but not recruiting new participants. */ @@ -25,7 +29,7 @@ public class ActiveNotRecruiting { /** * Builder for {@link ActiveNotRecruiting} */ - public static final class ActiveNotRecruitingThingBuilder implements Builder { + static final class ActiveNotRecruitingThingBuilder implements Builder { /** * Creates new {@link ActiveNotRecruiting} instance. */ @@ -34,7 +38,7 @@ public ActiveNotRecruiting build() { } } public interface Builder extends ThingBuilder { - + } protected ActiveNotRecruiting() { diff --git a/src/main/java/org/schema/AddAction.java b/src/main/java/org/schema/AddAction.java index b5204b7c..19d8e4b7 100644 --- a/src/main/java/org/schema/AddAction.java +++ b/src/main/java/org/schema/AddAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of editing by adding an object to a collection. */ @@ -25,7 +29,7 @@ public class AddAction extends UpdateAction { /** * Builder for {@link AddAction} */ - public static final class AddActionThingBuilder implements Builder { + static final class AddActionThingBuilder implements Builder { /** * Creates new {@link AddAction} instance. */ @@ -35,20 +39,20 @@ public AddAction build() { /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing thing) { + @NotNull public Builder targetCollection(Thing thing) { this.targetCollection = thing; return this; } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing.Builder thing) { + @NotNull public Builder targetCollection(Thing.Builder thing) { return this.targetCollection(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder targetCollection(Thing thing); - Builder targetCollection(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder targetCollection(Thing thing); + @NotNull Builder targetCollection(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AdministrativeArea.java b/src/main/java/org/schema/AdministrativeArea.java index 293b3574..6abaf8b5 100644 --- a/src/main/java/org/schema/AdministrativeArea.java +++ b/src/main/java/org/schema/AdministrativeArea.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A geographical region under the jurisdiction of a particular government. */ @@ -25,7 +29,7 @@ public class AdministrativeArea extends Place { /** * Builder for {@link AdministrativeArea} */ - public static final class AdministrativeAreaThingBuilder implements Builder { + static final class AdministrativeAreaThingBuilder implements Builder { /** * Creates new {@link AdministrativeArea} instance. */ @@ -35,66 +39,66 @@ public AdministrativeArea build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AdultEntertainment.java b/src/main/java/org/schema/AdultEntertainment.java index 4be97db2..1d70f43b 100644 --- a/src/main/java/org/schema/AdultEntertainment.java +++ b/src/main/java/org/schema/AdultEntertainment.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An adult entertainment establishment. */ @@ -25,7 +29,7 @@ public class AdultEntertainment extends EntertainmentBusiness { /** * Builder for {@link AdultEntertainment} */ - public static final class AdultEntertainmentThingBuilder implements Builder { + static final class AdultEntertainmentThingBuilder implements Builder { /** * Creates new {@link AdultEntertainment} instance. */ @@ -35,107 +39,107 @@ public AdultEntertainment build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AerobicActivity.java b/src/main/java/org/schema/AerobicActivity.java index 018d2726..7cb3655c 100644 --- a/src/main/java/org/schema/AerobicActivity.java +++ b/src/main/java/org/schema/AerobicActivity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Physical activity of relatively low intensity that depends primarily on the aerobic energy-generating process; during activity, the aerobic metabolism uses oxygen to adequately meet energy demands during exercise. */ @@ -25,7 +29,7 @@ public class AerobicActivity { /** * Builder for {@link AerobicActivity} */ - public static final class AerobicActivityThingBuilder implements Builder { + static final class AerobicActivityThingBuilder implements Builder { /** * Creates new {@link AerobicActivity} instance. */ @@ -34,7 +38,7 @@ public AerobicActivity build() { } } public interface Builder extends ThingBuilder { - + } protected AerobicActivity() { diff --git a/src/main/java/org/schema/AggregateOffer.java b/src/main/java/org/schema/AggregateOffer.java index abce4b46..309328ec 100644 --- a/src/main/java/org/schema/AggregateOffer.java +++ b/src/main/java/org/schema/AggregateOffer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * When a single product is associated with multiple offers (for example, the same pair of shoes is offered by different merchants), then AggregateOffer can be used. */ @@ -37,7 +41,7 @@ public NumberOrString getLowPrice() { /** * The number of offers for the product. */ - public Integer getOfferCount() { + public int getOfferCount() { return myOfferCount; } /** @@ -49,7 +53,7 @@ public Offer getOffers() { /** * Builder for {@link AggregateOffer} */ - public static final class AggregateOfferThingBuilder implements Builder { + static final class AggregateOfferThingBuilder implements Builder { /** * Creates new {@link AggregateOffer} instance. */ @@ -59,7 +63,7 @@ public AggregateOffer build() { /** * The highest price of all offers available. */ - public Builder highPrice(Number number) { + @NotNull public Builder highPrice(Number number) { if (this.highPrice == null) this.highPrice = new NumberOrString(); this.highPrice.setNumber(number); return this; @@ -67,7 +71,7 @@ public Builder highPrice(Number number) { /** * The highest price of all offers available. */ - public Builder highPrice(String highPrice) { + @NotNull public Builder highPrice(String highPrice) { if (this.highPrice == null) this.highPrice = new NumberOrString(); this.highPrice.setString(highPrice); return this; @@ -75,7 +79,7 @@ public Builder highPrice(String highPrice) { /** * The lowest price of all offers available. */ - public Builder lowPrice(Number number) { + @NotNull public Builder lowPrice(Number number) { if (this.lowPrice == null) this.lowPrice = new NumberOrString(); this.lowPrice.setNumber(number); return this; @@ -83,7 +87,7 @@ public Builder lowPrice(Number number) { /** * The lowest price of all offers available. */ - public Builder lowPrice(String lowPrice) { + @NotNull public Builder lowPrice(String lowPrice) { if (this.lowPrice == null) this.lowPrice = new NumberOrString(); this.lowPrice.setString(lowPrice); return this; @@ -91,145 +95,145 @@ public Builder lowPrice(String lowPrice) { /** * The number of offers for the product. */ - public Builder offerCount(Integer integer) { - this.offerCount = integer; + @NotNull public Builder offerCount(int offerCount) { + this.offerCount = offerCount; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The payment method(s) accepted by seller for this offer. */ - public Builder acceptedPaymentMethod(PaymentMethod paymentMethod) { + @NotNull public Builder acceptedPaymentMethod(PaymentMethod paymentMethod) { this.acceptedPaymentMethod = paymentMethod; return this; } /** * The payment method(s) accepted by seller for this offer. */ - public Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod) { + @NotNull public Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod) { return this.acceptedPaymentMethod(paymentMethod.build()); } /** * An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge). */ - public Builder addOn(Offer offer) { + @NotNull public Builder addOn(Offer offer) { this.addOn = offer; return this; } /** * An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge). */ - public Builder addOn(Offer.Builder offer) { + @NotNull public Builder addOn(Offer.Builder offer) { return this.addOn(offer.build()); } /** * The amount of time that is required between accepting the offer and the actual usage of the resource or service. */ - public Builder advanceBookingRequirement(QuantitativeValue quantitativeValue) { + @NotNull public Builder advanceBookingRequirement(QuantitativeValue quantitativeValue) { this.advanceBookingRequirement = quantitativeValue; return this; } /** * The amount of time that is required between accepting the offer and the actual usage of the resource or service. */ - public Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue) { return this.advanceBookingRequirement(quantitativeValue.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The availability of this item—for example In stock, Out of stock, Pre-order, etc. */ - public Builder availability(ItemAvailability itemAvailability) { + @NotNull public Builder availability(ItemAvailability itemAvailability) { this.availability = itemAvailability; return this; } /** * The availability of this item—for example In stock, Out of stock, Pre-order, etc. */ - public Builder availability(ItemAvailability.Builder itemAvailability) { + @NotNull public Builder availability(ItemAvailability.Builder itemAvailability) { return this.availability(itemAvailability.build()); } /** * The end of the availability of the product or service included in the offer. */ - public Builder availabilityEnds(java.util.Date date) { + @NotNull public Builder availabilityEnds(java.util.Date date) { this.availabilityEnds = date; return this; } /** * The beginning of the availability of the product or service included in the offer. */ - public Builder availabilityStarts(java.util.Date date) { + @NotNull public Builder availabilityStarts(java.util.Date date) { this.availabilityStarts = date; return this; } /** * The place(s) from which the offer can be obtained (e.g. store locations). */ - public Builder availableAtOrFrom(Place place) { + @NotNull public Builder availableAtOrFrom(Place place) { this.availableAtOrFrom = place; return this; } /** * The place(s) from which the offer can be obtained (e.g. store locations). */ - public Builder availableAtOrFrom(Place.Builder place) { + @NotNull public Builder availableAtOrFrom(Place.Builder place) { return this.availableAtOrFrom(place.build()); } /** * The delivery method(s) available for this offer. */ - public Builder availableDeliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder availableDeliveryMethod(DeliveryMethod deliveryMethod) { this.availableDeliveryMethod = deliveryMethod; return this; } /** * The delivery method(s) available for this offer. */ - public Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.availableDeliveryMethod(deliveryMethod.build()); } /** * The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell. */ - public Builder businessFunction(BusinessFunction businessFunction) { + @NotNull public Builder businessFunction(BusinessFunction businessFunction) { this.businessFunction = businessFunction; return this; } /** * The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell. */ - public Builder businessFunction(BusinessFunction.Builder businessFunction) { + @NotNull public Builder businessFunction(BusinessFunction.Builder businessFunction) { return this.businessFunction(businessFunction.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -237,13 +241,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -251,7 +255,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -259,65 +263,65 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The typical delay between the receipt of the order and the goods leaving the warehouse. */ - public Builder deliveryLeadTime(QuantitativeValue quantitativeValue) { + @NotNull public Builder deliveryLeadTime(QuantitativeValue quantitativeValue) { this.deliveryLeadTime = quantitativeValue; return this; } /** * The typical delay between the receipt of the order and the goods leaving the warehouse. */ - public Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue) { return this.deliveryLeadTime(quantitativeValue.build()); } /** * The type(s) of customers for which the given offer is valid. */ - public Builder eligibleCustomerType(BusinessEntityType businessEntityType) { + @NotNull public Builder eligibleCustomerType(BusinessEntityType businessEntityType) { this.eligibleCustomerType = businessEntityType; return this; } /** * The type(s) of customers for which the given offer is valid. */ - public Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType) { + @NotNull public Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType) { return this.eligibleCustomerType(businessEntityType.build()); } /** * The duration for which the given offer is valid. */ - public Builder eligibleDuration(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleDuration(QuantitativeValue quantitativeValue) { this.eligibleDuration = quantitativeValue; return this; } /** * The duration for which the given offer is valid. */ - public Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue) { return this.eligibleDuration(quantitativeValue.build()); } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { this.eligibleQuantity = quantitativeValue; return this; } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { return this.eligibleQuantity(quantitativeValue.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(GeoShape geoShape) { + @NotNull public Builder eligibleRegion(GeoShape geoShape) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setGeoShape(geoShape); return this; @@ -325,13 +329,13 @@ public Builder eligibleRegion(GeoShape geoShape) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(GeoShape.Builder geoShape) { + @NotNull public Builder eligibleRegion(GeoShape.Builder geoShape) { return this.eligibleRegion(geoShape.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(Place place) { + @NotNull public Builder eligibleRegion(Place place) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setPlace(place); return this; @@ -339,13 +343,13 @@ public Builder eligibleRegion(Place place) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(Place.Builder place) { + @NotNull public Builder eligibleRegion(Place.Builder place) { return this.eligibleRegion(place.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(String eligibleRegion) { + @NotNull public Builder eligibleRegion(String eligibleRegion) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setString(eligibleRegion); return this; @@ -353,7 +357,7 @@ public Builder eligibleRegion(String eligibleRegion) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(GeoShape geoShape) { + @NotNull public Builder ineligibleRegion(GeoShape geoShape) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setGeoShape(geoShape); return this; @@ -361,13 +365,13 @@ public Builder ineligibleRegion(GeoShape geoShape) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(GeoShape.Builder geoShape) { + @NotNull public Builder ineligibleRegion(GeoShape.Builder geoShape) { return this.ineligibleRegion(geoShape.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(Place place) { + @NotNull public Builder ineligibleRegion(Place place) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setPlace(place); return this; @@ -375,13 +379,13 @@ public Builder ineligibleRegion(Place place) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(Place.Builder place) { + @NotNull public Builder ineligibleRegion(Place.Builder place) { return this.ineligibleRegion(place.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(String ineligibleRegion) { + @NotNull public Builder ineligibleRegion(String ineligibleRegion) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setString(ineligibleRegion); return this; @@ -389,100 +393,100 @@ public Builder ineligibleRegion(String ineligibleRegion) { /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { this.eligibleTransactionVolume = priceSpecification; return this; } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { return this.eligibleTransactionVolume(priceSpecification.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * This links to a node or nodes indicating the exact quantity of the products included in the offer. */ - public Builder includesObject(TypeAndQuantityNode typeAndQuantityNode) { + @NotNull public Builder includesObject(TypeAndQuantityNode typeAndQuantityNode) { this.includesObject = typeAndQuantityNode; return this; } /** * This links to a node or nodes indicating the exact quantity of the products included in the offer. */ - public Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode) { + @NotNull public Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode) { return this.includesObject(typeAndQuantityNode.build()); } /** * The current approximate inventory level for the item or items. */ - public Builder inventoryLevel(QuantitativeValue quantitativeValue) { + @NotNull public Builder inventoryLevel(QuantitativeValue quantitativeValue) { this.inventoryLevel = quantitativeValue; return this; } /** * The current approximate inventory level for the item or items. */ - public Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue) { return this.inventoryLevel(quantitativeValue.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * The item being offered. */ - public Builder itemOffered(Product product) { + @NotNull public Builder itemOffered(Product product) { this.itemOffered = product; return this; } /** * The item being offered. */ - public Builder itemOffered(Product.Builder product) { + @NotNull public Builder itemOffered(Product.Builder product) { return this.itemOffered(product.build()); } /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } @@ -509,7 +513,7 @@ public Builder mpn(String mpn) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -537,7 +541,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -545,102 +549,102 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The date after which the price is no longer available. */ - public Builder priceValidUntil(java.util.Date date) { + @NotNull public Builder priceValidUntil(java.util.Date date) { this.priceValidUntil = date; return this; } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider. */ - public Builder seller(Participant participant) { + @NotNull public Builder seller(Participant participant) { this.seller = participant; return this; } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The end of the validity of offer, price specification, or opening hours data. */ - public Builder validThrough(java.util.Date date) { + @NotNull public Builder validThrough(java.util.Date date) { this.validThrough = date; return this; } /** * The warranty promise(s) included in the offer. */ - public Builder warranty(WarrantyPromise warrantyPromise) { + @NotNull public Builder warranty(WarrantyPromise warrantyPromise) { this.warranty = warrantyPromise; return this; } /** * The warranty promise(s) included in the offer. */ - public Builder warranty(WarrantyPromise.Builder warrantyPromise) { + @NotNull public Builder warranty(WarrantyPromise.Builder warrantyPromise) { return this.warranty(warrantyPromise.build()); } /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -674,7 +678,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -709,7 +713,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -742,7 +746,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -750,38 +754,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -790,7 +794,7 @@ public Builder id(long id) { } private NumberOrString highPrice; private NumberOrString lowPrice; - private Integer offerCount; + private int offerCount; private Offer offers; private PaymentMethod acceptedPaymentMethod; private Offer addOn; @@ -840,98 +844,98 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder highPrice(Number number); - Builder highPrice(String highPrice); - Builder lowPrice(Number number); - Builder lowPrice(String lowPrice); - Builder offerCount(Integer integer); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder acceptedPaymentMethod(PaymentMethod paymentMethod); - Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod); - Builder addOn(Offer offer); - Builder addOn(Offer.Builder offer); - Builder advanceBookingRequirement(QuantitativeValue quantitativeValue); - Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder availability(ItemAvailability itemAvailability); - Builder availability(ItemAvailability.Builder itemAvailability); - Builder availabilityEnds(java.util.Date date); - Builder availabilityStarts(java.util.Date date); - Builder availableAtOrFrom(Place place); - Builder availableAtOrFrom(Place.Builder place); - Builder availableDeliveryMethod(DeliveryMethod deliveryMethod); - Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder businessFunction(BusinessFunction businessFunction); - Builder businessFunction(BusinessFunction.Builder businessFunction); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder deliveryLeadTime(QuantitativeValue quantitativeValue); - Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue); - Builder eligibleCustomerType(BusinessEntityType businessEntityType); - Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType); - Builder eligibleDuration(QuantitativeValue quantitativeValue); - Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue); - Builder eligibleQuantity(QuantitativeValue quantitativeValue); - Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); - Builder eligibleRegion(GeoShape geoShape); - Builder eligibleRegion(GeoShape.Builder geoShape); - Builder eligibleRegion(Place place); - Builder eligibleRegion(Place.Builder place); - Builder eligibleRegion(String eligibleRegion); - Builder ineligibleRegion(GeoShape geoShape); - Builder ineligibleRegion(GeoShape.Builder geoShape); - Builder ineligibleRegion(Place place); - Builder ineligibleRegion(Place.Builder place); - Builder ineligibleRegion(String ineligibleRegion); - Builder eligibleTransactionVolume(PriceSpecification priceSpecification); - Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder includesObject(TypeAndQuantityNode typeAndQuantityNode); - Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode); - Builder inventoryLevel(QuantitativeValue quantitativeValue); - Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder itemOffered(Product product); - Builder itemOffered(Product.Builder product); - Builder mpn(String mpn); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder priceValidUntil(java.util.Date date); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seller(Participant participant); - Builder sku(String sku); - Builder validFrom(java.util.Date date); - Builder validThrough(java.util.Date date); - Builder warranty(WarrantyPromise warrantyPromise); - Builder warranty(WarrantyPromise.Builder warrantyPromise); - Builder priceCurrency(String priceCurrency); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder highPrice(Number number); + @NotNull Builder highPrice(String highPrice); + @NotNull Builder lowPrice(Number number); + @NotNull Builder lowPrice(String lowPrice); + @NotNull Builder offerCount(int offerCount); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder acceptedPaymentMethod(PaymentMethod paymentMethod); + @NotNull Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod); + @NotNull Builder addOn(Offer offer); + @NotNull Builder addOn(Offer.Builder offer); + @NotNull Builder advanceBookingRequirement(QuantitativeValue quantitativeValue); + @NotNull Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder availability(ItemAvailability itemAvailability); + @NotNull Builder availability(ItemAvailability.Builder itemAvailability); + @NotNull Builder availabilityEnds(java.util.Date date); + @NotNull Builder availabilityStarts(java.util.Date date); + @NotNull Builder availableAtOrFrom(Place place); + @NotNull Builder availableAtOrFrom(Place.Builder place); + @NotNull Builder availableDeliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder businessFunction(BusinessFunction businessFunction); + @NotNull Builder businessFunction(BusinessFunction.Builder businessFunction); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder deliveryLeadTime(QuantitativeValue quantitativeValue); + @NotNull Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleCustomerType(BusinessEntityType businessEntityType); + @NotNull Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType); + @NotNull Builder eligibleDuration(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleRegion(GeoShape geoShape); + @NotNull Builder eligibleRegion(GeoShape.Builder geoShape); + @NotNull Builder eligibleRegion(Place place); + @NotNull Builder eligibleRegion(Place.Builder place); + @NotNull Builder eligibleRegion(String eligibleRegion); + @NotNull Builder ineligibleRegion(GeoShape geoShape); + @NotNull Builder ineligibleRegion(GeoShape.Builder geoShape); + @NotNull Builder ineligibleRegion(Place place); + @NotNull Builder ineligibleRegion(Place.Builder place); + @NotNull Builder ineligibleRegion(String ineligibleRegion); + @NotNull Builder eligibleTransactionVolume(PriceSpecification priceSpecification); + @NotNull Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder includesObject(TypeAndQuantityNode typeAndQuantityNode); + @NotNull Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode); + @NotNull Builder inventoryLevel(QuantitativeValue quantitativeValue); + @NotNull Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder itemOffered(Product product); + @NotNull Builder itemOffered(Product.Builder product); + @NotNull Builder mpn(String mpn); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder priceValidUntil(java.util.Date date); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seller(Participant participant); + @NotNull Builder sku(String sku); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validThrough(java.util.Date date); + @NotNull Builder warranty(WarrantyPromise warrantyPromise); + @NotNull Builder warranty(WarrantyPromise.Builder warrantyPromise); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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(NumberOrString highPrice, NumberOrString lowPrice, int 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) { 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; @@ -940,6 +944,6 @@ protected AggregateOffer(NumberOrString highPrice, NumberOrString lowPrice, Inte } private NumberOrString myHighPrice; private NumberOrString myLowPrice; - private Integer myOfferCount; + private int myOfferCount; private Offer myOffers; } diff --git a/src/main/java/org/schema/AggregateRating.java b/src/main/java/org/schema/AggregateRating.java index af54a584..0cccedd2 100644 --- a/src/main/java/org/schema/AggregateRating.java +++ b/src/main/java/org/schema/AggregateRating.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The average rating based on multiple ratings or reviews. */ @@ -31,19 +35,19 @@ public Thing getItemReviewed() { /** * The count of total number of ratings. */ - public Integer getRatingCount() { + public int getRatingCount() { return myRatingCount; } /** * The count of total number of reviews. */ - public Integer getReviewCount() { + public int getReviewCount() { return myReviewCount; } /** * Builder for {@link AggregateRating} */ - public static final class AggregateRatingThingBuilder implements Builder { + static final class AggregateRatingThingBuilder implements Builder { /** * Creates new {@link AggregateRating} instance. */ @@ -53,34 +57,34 @@ public AggregateRating build() { /** * The item that is being reviewed/rated. */ - public Builder itemReviewed(Thing thing) { + @NotNull public Builder itemReviewed(Thing thing) { this.itemReviewed = thing; return this; } /** * The item that is being reviewed/rated. */ - public Builder itemReviewed(Thing.Builder thing) { + @NotNull public Builder itemReviewed(Thing.Builder thing) { return this.itemReviewed(thing.build()); } /** * The count of total number of ratings. */ - public Builder ratingCount(Integer integer) { - this.ratingCount = integer; + @NotNull public Builder ratingCount(int ratingCount) { + this.ratingCount = ratingCount; return this; } /** * The count of total number of reviews. */ - public Builder reviewCount(Integer integer) { - this.reviewCount = integer; + @NotNull public Builder reviewCount(int reviewCount) { + this.reviewCount = reviewCount; return this; } /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ - public Builder bestRating(Number number) { + @NotNull public Builder bestRating(Number number) { if (this.bestRating == null) this.bestRating = new NumberOrString(); this.bestRating.setNumber(number); return this; @@ -88,7 +92,7 @@ public Builder bestRating(Number number) { /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ - public Builder bestRating(String bestRating) { + @NotNull public Builder bestRating(String bestRating) { if (this.bestRating == null) this.bestRating = new NumberOrString(); this.bestRating.setString(bestRating); return this; @@ -96,14 +100,14 @@ public Builder bestRating(String bestRating) { /** * The rating for the content. */ - public Builder ratingValue(String ratingValue) { + @NotNull public Builder ratingValue(String ratingValue) { this.ratingValue = ratingValue; return this; } /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ - public Builder worstRating(Number number) { + @NotNull public Builder worstRating(Number number) { if (this.worstRating == null) this.worstRating = new NumberOrString(); this.worstRating.setNumber(number); return this; @@ -111,7 +115,7 @@ public Builder worstRating(Number number) { /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ - public Builder worstRating(String worstRating) { + @NotNull public Builder worstRating(String worstRating) { if (this.worstRating == null) this.worstRating = new NumberOrString(); this.worstRating.setString(worstRating); return this; @@ -119,21 +123,21 @@ public Builder worstRating(String worstRating) { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -167,7 +171,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -202,7 +206,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -235,7 +239,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -243,38 +247,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -282,8 +286,8 @@ public Builder id(long id) { return id(Long.toString(id)); } private Thing itemReviewed; - private Integer ratingCount; - private Integer reviewCount; + private int ratingCount; + private int reviewCount; private NumberOrString bestRating; private String ratingValue; private NumberOrString worstRating; @@ -298,36 +302,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder itemReviewed(Thing thing); - Builder itemReviewed(Thing.Builder thing); - Builder ratingCount(Integer integer); - Builder reviewCount(Integer integer); - Builder bestRating(Number number); - Builder bestRating(String bestRating); - Builder ratingValue(String ratingValue); - Builder worstRating(Number number); - Builder worstRating(String worstRating); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder itemReviewed(Thing thing); + @NotNull Builder itemReviewed(Thing.Builder thing); + @NotNull Builder ratingCount(int ratingCount); + @NotNull Builder reviewCount(int reviewCount); + @NotNull Builder bestRating(Number number); + @NotNull Builder bestRating(String bestRating); + @NotNull Builder ratingValue(String ratingValue); + @NotNull Builder worstRating(Number number); + @NotNull Builder worstRating(String worstRating); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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, int ratingCount, int 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) { super(bestRating, ratingValue, worstRating, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myItemReviewed = itemReviewed; myRatingCount = ratingCount; myReviewCount = reviewCount; } private Thing myItemReviewed; - private Integer myRatingCount; - private Integer myReviewCount; + private int myRatingCount; + private int myReviewCount; } diff --git a/src/main/java/org/schema/AgreeAction.java b/src/main/java/org/schema/AgreeAction.java index cd363d3a..db4e3a07 100644 --- a/src/main/java/org/schema/AgreeAction.java +++ b/src/main/java/org/schema/AgreeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of expressing a consistency of opinion with the object. An agent agrees to/about an object (a proposition, topic or theme) with participants. */ @@ -25,7 +29,7 @@ public class AgreeAction extends ReactAction { /** * Builder for {@link AgreeAction} */ - public static final class AgreeActionThingBuilder implements Builder { + static final class AgreeActionThingBuilder implements Builder { /** * Creates new {@link AgreeAction} instance. */ @@ -35,7 +39,7 @@ public AgreeAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Airline.java b/src/main/java/org/schema/Airline.java index 9eeee5a2..ff28cd9b 100644 --- a/src/main/java/org/schema/Airline.java +++ b/src/main/java/org/schema/Airline.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An organization that provides flights for passengers. */ @@ -37,7 +41,7 @@ public String getIataCode() { /** * Builder for {@link Airline} */ - public static final class AirlineThingBuilder implements Builder { + static final class AirlineThingBuilder implements Builder { /** * Creates new {@link Airline} instance. */ @@ -47,60 +51,60 @@ public Airline build() { /** * The type of boarding policy used by the airline (e.g. zone-based or group-based). */ - public Builder boardingPolicy(BoardingPolicyType boardingPolicyType) { + @NotNull public Builder boardingPolicy(BoardingPolicyType boardingPolicyType) { this.boardingPolicy = boardingPolicyType; return this; } /** * The type of boarding policy used by the airline (e.g. zone-based or group-based). */ - public Builder boardingPolicy(BoardingPolicyType.Builder boardingPolicyType) { + @NotNull public Builder boardingPolicy(BoardingPolicyType.Builder boardingPolicyType) { return this.boardingPolicy(boardingPolicyType.build()); } /** * IATA identifier for an airline or airport. */ - public Builder iataCode(String iataCode) { + @NotNull public Builder iataCode(String iataCode) { this.iataCode = iataCode; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -108,13 +112,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -122,147 +126,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -270,13 +274,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -284,20 +288,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -305,13 +309,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -319,13 +323,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -333,13 +337,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -347,33 +351,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -381,13 +385,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -395,100 +399,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -522,7 +526,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -557,7 +561,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -590,7 +594,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -598,38 +602,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -681,81 +685,81 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder boardingPolicy(BoardingPolicyType boardingPolicyType); - Builder boardingPolicy(BoardingPolicyType.Builder boardingPolicyType); - Builder iataCode(String iataCode); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder boardingPolicy(BoardingPolicyType boardingPolicyType); + @NotNull Builder boardingPolicy(BoardingPolicyType.Builder boardingPolicyType); + @NotNull Builder iataCode(String iataCode); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Airline(BoardingPolicyType boardingPolicy, String iataCode, 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) { diff --git a/src/main/java/org/schema/Airport.java b/src/main/java/org/schema/Airport.java index 87ae110c..031d1062 100644 --- a/src/main/java/org/schema/Airport.java +++ b/src/main/java/org/schema/Airport.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An airport. */ @@ -37,7 +41,7 @@ public String getIacoCode() { /** * Builder for {@link Airport} */ - public static final class AirportThingBuilder implements Builder { + static final class AirportThingBuilder implements Builder { /** * Creates new {@link Airport} instance. */ @@ -47,87 +51,87 @@ public Airport build() { /** * IATA identifier for an airline or airport. */ - public Builder iataCode(String iataCode) { + @NotNull public Builder iataCode(String iataCode) { this.iataCode = iataCode; return this; } /** * IACO identifier for an airport. */ - public Builder iacoCode(String iacoCode) { + @NotNull public Builder iacoCode(String iacoCode) { this.iacoCode = iacoCode; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -135,13 +139,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -149,27 +153,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -177,13 +181,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -191,7 +195,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -199,13 +203,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -213,20 +217,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -234,13 +238,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -248,26 +252,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -277,7 +281,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -287,27 +291,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,53 +488,53 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder iataCode(String iataCode); - Builder iacoCode(String iacoCode); - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder iataCode(String iataCode); + @NotNull Builder iacoCode(String iacoCode); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Airport(String iataCode, String iacoCode, 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) { diff --git a/src/main/java/org/schema/AlbumRelease.java b/src/main/java/org/schema/AlbumRelease.java index 5e0bea06..0f614df3 100644 --- a/src/main/java/org/schema/AlbumRelease.java +++ b/src/main/java/org/schema/AlbumRelease.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * AlbumRelease. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class AlbumRelease { /** * Builder for {@link AlbumRelease} */ - public static final class AlbumReleaseThingBuilder implements Builder { + static final class AlbumReleaseThingBuilder implements Builder { /** * Creates new {@link AlbumRelease} instance. */ @@ -35,7 +39,7 @@ public AlbumRelease build() { } } public interface Builder extends ThingBuilder { - + } protected AlbumRelease() { diff --git a/src/main/java/org/schema/AlignmentObject.java b/src/main/java/org/schema/AlignmentObject.java index 84821d00..a1bc3ae8 100644 --- a/src/main/java/org/schema/AlignmentObject.java +++ b/src/main/java/org/schema/AlignmentObject.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An intangible item that describes an alignment between a learning resource and a node in an educational framework. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_LRMIClass @@ -56,7 +60,7 @@ public String getTargetUrl() { /** * Builder for {@link AlignmentObject} */ - public static final class AlignmentObjectThingBuilder implements Builder { + static final class AlignmentObjectThingBuilder implements Builder { /** * Creates new {@link AlignmentObject} instance. */ @@ -66,56 +70,56 @@ public AlignmentObject build() { /** * A category of alignment between the learning resource and the framework node. Recommended values include: 'assesses', 'teaches', 'requires', 'textComplexity', 'readingLevel', 'educationalSubject', and 'educationLevel'. */ - public Builder alignmentType(String alignmentType) { + @NotNull public Builder alignmentType(String alignmentType) { this.alignmentType = alignmentType; return this; } /** * The framework to which the resource being described is aligned. */ - public Builder educationalFramework(String educationalFramework) { + @NotNull public Builder educationalFramework(String educationalFramework) { this.educationalFramework = educationalFramework; return this; } /** * The description of a node in an established educational framework. */ - public Builder targetDescription(String targetDescription) { + @NotNull public Builder targetDescription(String targetDescription) { this.targetDescription = targetDescription; return this; } /** * The name of a node in an established educational framework. */ - public Builder targetName(String targetName) { + @NotNull public Builder targetName(String targetName) { this.targetName = targetName; return this; } /** * The URL of a node in an established educational framework. */ - public Builder targetUrl(String targetUrl) { + @NotNull public Builder targetUrl(String targetUrl) { this.targetUrl = targetUrl; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -149,7 +153,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -184,7 +188,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -217,7 +221,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -225,38 +229,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -279,23 +283,23 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder alignmentType(String alignmentType); - Builder educationalFramework(String educationalFramework); - Builder targetDescription(String targetDescription); - Builder targetName(String targetName); - Builder targetUrl(String targetUrl); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder alignmentType(String alignmentType); + @NotNull Builder educationalFramework(String educationalFramework); + @NotNull Builder targetDescription(String targetDescription); + @NotNull Builder targetName(String targetName); + @NotNull Builder targetUrl(String targetUrl); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected AlignmentObject(String alignmentType, String educationalFramework, String targetDescription, String targetName, String targetUrl, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/AllWheelDriveConfiguration.java b/src/main/java/org/schema/AllWheelDriveConfiguration.java index f8ca3e60..051a1be1 100644 --- a/src/main/java/org/schema/AllWheelDriveConfiguration.java +++ b/src/main/java/org/schema/AllWheelDriveConfiguration.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * All-wheel Drive is a transmission layout where the engine drives all four wheels. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class AllWheelDriveConfiguration { /** * Builder for {@link AllWheelDriveConfiguration} */ - public static final class AllWheelDriveConfigurationThingBuilder implements Builder { + static final class AllWheelDriveConfigurationThingBuilder implements Builder { /** * Creates new {@link AllWheelDriveConfiguration} instance. */ @@ -35,7 +39,7 @@ public AllWheelDriveConfiguration build() { } } public interface Builder extends ThingBuilder { - + } protected AllWheelDriveConfiguration() { diff --git a/src/main/java/org/schema/AllocateAction.java b/src/main/java/org/schema/AllocateAction.java index 7c74a850..d4446f24 100644 --- a/src/main/java/org/schema/AllocateAction.java +++ b/src/main/java/org/schema/AllocateAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of organizing tasks/objects/events by associating resources to it. */ @@ -31,7 +35,7 @@ public MedicalDevicePurposeOrThing getPurpose() { /** * Builder for {@link AllocateAction} */ - public static final class AllocateActionThingBuilder implements Builder { + static final class AllocateActionThingBuilder implements Builder { /** * Creates new {@link AllocateAction} instance. */ @@ -41,7 +45,7 @@ public AllocateAction build() { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setMedicalDevicePurpose(medicalDevicePurpose); return this; @@ -49,13 +53,13 @@ public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { return this.purpose(medicalDevicePurpose.build()); } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing thing) { + @NotNull public Builder purpose(Thing thing) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setThing(thing); return this; @@ -63,13 +67,13 @@ public Builder purpose(Thing thing) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing.Builder thing) { + @NotNull public Builder purpose(Thing.Builder thing) { return this.purpose(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -77,13 +81,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -91,7 +95,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -99,7 +103,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -108,67 +112,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -202,7 +206,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -237,7 +241,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -270,7 +274,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -278,38 +282,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -334,34 +338,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder purpose(MedicalDevicePurpose medicalDevicePurpose); - Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); - Builder purpose(Thing thing); - Builder purpose(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder purpose(MedicalDevicePurpose medicalDevicePurpose); + @NotNull Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); + @NotNull Builder purpose(Thing thing); + @NotNull Builder purpose(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected AllocateAction(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) { diff --git a/src/main/java/org/schema/AmusementPark.java b/src/main/java/org/schema/AmusementPark.java index ad63916a..9c111b55 100644 --- a/src/main/java/org/schema/AmusementPark.java +++ b/src/main/java/org/schema/AmusementPark.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An amusement park. */ @@ -25,7 +29,7 @@ public class AmusementPark extends EntertainmentBusiness { /** * Builder for {@link AmusementPark} */ - public static final class AmusementParkThingBuilder implements Builder { + static final class AmusementParkThingBuilder implements Builder { /** * Creates new {@link AmusementPark} instance. */ @@ -35,107 +39,107 @@ public AmusementPark build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AnaerobicActivity.java b/src/main/java/org/schema/AnaerobicActivity.java index 870024ca..e429f9a5 100644 --- a/src/main/java/org/schema/AnaerobicActivity.java +++ b/src/main/java/org/schema/AnaerobicActivity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Physical activity that is of high-intensity which utilizes the anaerobic metabolism of the body. */ @@ -25,7 +29,7 @@ public class AnaerobicActivity { /** * Builder for {@link AnaerobicActivity} */ - public static final class AnaerobicActivityThingBuilder implements Builder { + static final class AnaerobicActivityThingBuilder implements Builder { /** * Creates new {@link AnaerobicActivity} instance. */ @@ -34,7 +38,7 @@ public AnaerobicActivity build() { } } public interface Builder extends ThingBuilder { - + } protected AnaerobicActivity() { diff --git a/src/main/java/org/schema/AnatomicalStructure.java b/src/main/java/org/schema/AnatomicalStructure.java index 6d45025c..5c492614 100644 --- a/src/main/java/org/schema/AnatomicalStructure.java +++ b/src/main/java/org/schema/AnatomicalStructure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any part of the human body, typically a component of an anatomical system. Organs, tissues, and cells are all anatomical structures. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -80,7 +84,7 @@ public AnatomicalStructure getSubStructure() { /** * Builder for {@link AnatomicalStructure} */ - public static final class AnatomicalStructureThingBuilder implements Builder { + static final class AnatomicalStructureThingBuilder implements Builder { /** * Creates new {@link AnatomicalStructure} instance. */ @@ -90,192 +94,192 @@ public AnatomicalStructure build() { /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -309,7 +313,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -344,7 +348,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -377,7 +381,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -385,38 +389,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -449,44 +453,44 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected AnatomicalStructure(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) { diff --git a/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystem.java b/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystem.java index 51b7532d..f004354a 100644 --- a/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystem.java +++ b/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystem.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class AnatomicalStructureOrAnatomicalSystem { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myAnatomicalStructure != null) return myAnatomicalStructure; if (myAnatomicalSystem != null) return myAnatomicalSystem; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setAnatomicalStructure(AnatomicalStructure anatomicalStructure) { clear(); myAnatomicalStructure = anatomicalStructure; } public AnatomicalStructure getAnatomicalStructure() { return myAnatomicalStructure; } - private AnatomicalStructure myAnatomicalStructure; public void setAnatomicalSystem(AnatomicalSystem anatomicalSystem) { clear(); myAnatomicalSystem = anatomicalSystem; } public AnatomicalSystem getAnatomicalSystem() { return myAnatomicalSystem; } + private AnatomicalStructure myAnatomicalStructure; private AnatomicalSystem myAnatomicalSystem; private void clear() { myAnatomicalStructure = null; diff --git a/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.java b/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.java index 24b4afb2..f40f50e0 100644 --- a/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.java +++ b/src/main/java/org/schema/AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myAnatomicalStructure != null) return myAnatomicalStructure; if (myAnatomicalSystem != null) return myAnatomicalSystem; @@ -35,12 +38,12 @@ public Thing getThing() { } public void setAnatomicalStructure(AnatomicalStructure anatomicalStructure) { clear(); myAnatomicalStructure = anatomicalStructure; } public AnatomicalStructure getAnatomicalStructure() { return myAnatomicalStructure; } - private AnatomicalStructure myAnatomicalStructure; public void setAnatomicalSystem(AnatomicalSystem anatomicalSystem) { clear(); myAnatomicalSystem = anatomicalSystem; } public AnatomicalSystem getAnatomicalSystem() { return myAnatomicalSystem; } - private AnatomicalSystem myAnatomicalSystem; public void setSuperficialAnatomy(SuperficialAnatomy superficialAnatomy) { clear(); mySuperficialAnatomy = superficialAnatomy; } public SuperficialAnatomy getSuperficialAnatomy() { return mySuperficialAnatomy; } + private AnatomicalStructure myAnatomicalStructure; + private AnatomicalSystem myAnatomicalSystem; private SuperficialAnatomy mySuperficialAnatomy; private void clear() { myAnatomicalStructure = null; diff --git a/src/main/java/org/schema/AnatomicalStructureOrSuperficialAnatomy.java b/src/main/java/org/schema/AnatomicalStructureOrSuperficialAnatomy.java index 126ae41b..33df5827 100644 --- a/src/main/java/org/schema/AnatomicalStructureOrSuperficialAnatomy.java +++ b/src/main/java/org/schema/AnatomicalStructureOrSuperficialAnatomy.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class AnatomicalStructureOrSuperficialAnatomy { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myAnatomicalStructure != null) return myAnatomicalStructure; if (mySuperficialAnatomy != null) return mySuperficialAnatomy; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setAnatomicalStructure(AnatomicalStructure anatomicalStructure) { clear(); myAnatomicalStructure = anatomicalStructure; } public AnatomicalStructure getAnatomicalStructure() { return myAnatomicalStructure; } - private AnatomicalStructure myAnatomicalStructure; public void setSuperficialAnatomy(SuperficialAnatomy superficialAnatomy) { clear(); mySuperficialAnatomy = superficialAnatomy; } public SuperficialAnatomy getSuperficialAnatomy() { return mySuperficialAnatomy; } + private AnatomicalStructure myAnatomicalStructure; private SuperficialAnatomy mySuperficialAnatomy; private void clear() { myAnatomicalStructure = null; diff --git a/src/main/java/org/schema/AnatomicalSystem.java b/src/main/java/org/schema/AnatomicalSystem.java index f7aa3093..d5683be4 100644 --- a/src/main/java/org/schema/AnatomicalSystem.java +++ b/src/main/java/org/schema/AnatomicalSystem.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An anatomical system is a group of anatomical structures that work together to perform a certain task. Anatomical systems, such as organ systems, are one organizing principle of anatomy, and can includes circulatory, digestive, endocrine, integumentary, immune, lymphatic, muscular, nervous, reproductive, respiratory, skeletal, urinary, vestibular, and other systems. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -56,7 +60,7 @@ public MedicalTherapy getRelatedTherapy() { /** * Builder for {@link AnatomicalSystem} */ - public static final class AnatomicalSystemThingBuilder implements Builder { + static final class AnatomicalSystemThingBuilder implements Builder { /** * Creates new {@link AnatomicalSystem} instance. */ @@ -66,14 +70,14 @@ public AnatomicalSystem build() { /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * The underlying anatomical structures, such as organs, that comprise the anatomical system. */ - public Builder comprisedOf(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder comprisedOf(AnatomicalStructure anatomicalStructure) { if (this.comprisedOf == null) this.comprisedOf = new AnatomicalStructureOrAnatomicalSystem(); this.comprisedOf.setAnatomicalStructure(anatomicalStructure); return this; @@ -81,13 +85,13 @@ public Builder comprisedOf(AnatomicalStructure anatomicalStructure) { /** * The underlying anatomical structures, such as organs, that comprise the anatomical system. */ - public Builder comprisedOf(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder comprisedOf(AnatomicalStructure.Builder anatomicalStructure) { return this.comprisedOf(anatomicalStructure.build()); } /** * The underlying anatomical structures, such as organs, that comprise the anatomical system. */ - public Builder comprisedOf(AnatomicalSystem anatomicalSystem) { + @NotNull public Builder comprisedOf(AnatomicalSystem anatomicalSystem) { if (this.comprisedOf == null) this.comprisedOf = new AnatomicalStructureOrAnatomicalSystem(); this.comprisedOf.setAnatomicalSystem(anatomicalSystem); return this; @@ -95,144 +99,144 @@ public Builder comprisedOf(AnatomicalSystem anatomicalSystem) { /** * The underlying anatomical structures, such as organs, that comprise the anatomical system. */ - public Builder comprisedOf(AnatomicalSystem.Builder anatomicalSystem) { + @NotNull public Builder comprisedOf(AnatomicalSystem.Builder anatomicalSystem) { return this.comprisedOf(anatomicalSystem.build()); } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * Related anatomical structure(s) that are not part of the system but relate or connect to it, such as vascular bundles associated with an organ system. */ - public Builder relatedStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder relatedStructure(AnatomicalStructure anatomicalStructure) { this.relatedStructure = anatomicalStructure; return this; } /** * Related anatomical structure(s) that are not part of the system but relate or connect to it, such as vascular bundles associated with an organ system. */ - public Builder relatedStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder relatedStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.relatedStructure(anatomicalStructure.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -266,7 +270,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -301,7 +305,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -334,7 +338,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -342,38 +346,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -402,41 +406,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedPathophysiology(String associatedPathophysiology); - Builder comprisedOf(AnatomicalStructure anatomicalStructure); - Builder comprisedOf(AnatomicalStructure.Builder anatomicalStructure); - Builder comprisedOf(AnatomicalSystem anatomicalSystem); - Builder comprisedOf(AnatomicalSystem.Builder anatomicalSystem); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedStructure(AnatomicalStructure anatomicalStructure); - Builder relatedStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder comprisedOf(AnatomicalStructure anatomicalStructure); + @NotNull Builder comprisedOf(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder comprisedOf(AnatomicalSystem anatomicalSystem); + @NotNull Builder comprisedOf(AnatomicalSystem.Builder anatomicalSystem); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder relatedStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected AnatomicalSystem(String associatedPathophysiology, AnatomicalStructureOrAnatomicalSystem comprisedOf, MedicalCondition relatedCondition, AnatomicalStructure relatedStructure, MedicalTherapy relatedTherapy, 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) { diff --git a/src/main/java/org/schema/Anesthesia.java b/src/main/java/org/schema/Anesthesia.java index 0da3691d..bceb6075 100644 --- a/src/main/java/org/schema/Anesthesia.java +++ b/src/main/java/org/schema/Anesthesia.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to study of anesthetics and their application. */ @@ -25,7 +29,7 @@ public class Anesthesia { /** * Builder for {@link Anesthesia} */ - public static final class AnesthesiaThingBuilder implements Builder { + static final class AnesthesiaThingBuilder implements Builder { /** * Creates new {@link Anesthesia} instance. */ @@ -34,7 +38,7 @@ public Anesthesia build() { } } public interface Builder extends ThingBuilder { - + } protected Anesthesia() { diff --git a/src/main/java/org/schema/AnimalShelter.java b/src/main/java/org/schema/AnimalShelter.java index 4c9b2850..4b999e88 100644 --- a/src/main/java/org/schema/AnimalShelter.java +++ b/src/main/java/org/schema/AnimalShelter.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Animal shelter. */ @@ -25,7 +29,7 @@ public class AnimalShelter extends LocalBusiness { /** * Builder for {@link AnimalShelter} */ - public static final class AnimalShelterThingBuilder implements Builder { + static final class AnimalShelterThingBuilder implements Builder { /** * Creates new {@link AnimalShelter} instance. */ @@ -35,107 +39,107 @@ public AnimalShelter build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Answer.java b/src/main/java/org/schema/Answer.java index 52c8b9de..54b1b510 100644 --- a/src/main/java/org/schema/Answer.java +++ b/src/main/java/org/schema/Answer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An answer offered to a question; perhaps correct, perhaps opinionated or wrong. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_QAStackExchange @@ -26,7 +30,7 @@ public class Answer extends Comment implements SuggestedAnswer { /** * Builder for {@link Answer} */ - public static final class AnswerThingBuilder implements Builder { + static final class AnswerThingBuilder implements Builder { /** * Creates new {@link Answer} instance. */ @@ -36,154 +40,154 @@ public Answer build() { /** * The number of upvotes this question, answer or comment has received from the community. */ - public Builder upvoteCount(Integer integer) { - this.upvoteCount = integer; + @NotNull public Builder upvoteCount(int upvoteCount) { + this.upvoteCount = upvoteCount; return this; } /** * The number of downvotes this question, answer or comment has received from the community. */ - public Builder downvoteCount(Integer integer) { - this.downvoteCount = integer; + @NotNull public Builder downvoteCount(int downvoteCount) { + this.downvoteCount = downvoteCount; return this; } /** * The parent of a question, answer or item in general. */ - public Builder parentItem(Question question) { + @NotNull public Builder parentItem(Question question) { this.parentItem = question; return this; } /** * The parent of a question, answer or item in general. */ - public Builder parentItem(Question.Builder question) { + @NotNull public Builder parentItem(Question.Builder question) { return this.parentItem(question.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -191,13 +195,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -205,20 +209,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -226,13 +230,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -240,40 +244,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -295,13 +299,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -309,13 +313,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -323,21 +327,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -345,7 +349,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -353,7 +357,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -361,7 +365,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -369,7 +373,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -377,13 +381,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -391,101 +395,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -493,13 +497,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -507,35 +511,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -543,13 +547,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -557,53 +561,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -611,13 +615,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -625,127 +629,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -753,7 +757,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -761,7 +765,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -769,7 +773,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -777,20 +781,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -798,13 +802,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -812,66 +816,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -879,13 +883,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -893,40 +897,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -960,7 +964,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -995,7 +999,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1028,7 +1032,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1036,46 +1040,46 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private Integer upvoteCount; - private Integer downvoteCount; + private int upvoteCount; + private int downvoteCount; private Question parentItem; private String schemaVersion; private Thing about; @@ -1133,7 +1137,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1151,148 +1155,148 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder upvoteCount(Integer integer); - Builder downvoteCount(Integer integer); - Builder parentItem(Question question); - Builder parentItem(Question.Builder question); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder upvoteCount(int upvoteCount); + @NotNull Builder downvoteCount(int downvoteCount); + @NotNull Builder parentItem(Question question); + @NotNull Builder parentItem(Question.Builder question); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + protected Answer(int upvoteCount, int 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, int 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); } } diff --git a/src/main/java/org/schema/ApartmentComplex.java b/src/main/java/org/schema/ApartmentComplex.java index e3394465..53cc21ac 100644 --- a/src/main/java/org/schema/ApartmentComplex.java +++ b/src/main/java/org/schema/ApartmentComplex.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Residence type: Apartment complex. */ @@ -25,7 +29,7 @@ public class ApartmentComplex extends Residence { /** * Builder for {@link ApartmentComplex} */ - public static final class ApartmentComplexThingBuilder implements Builder { + static final class ApartmentComplexThingBuilder implements Builder { /** * Creates new {@link ApartmentComplex} instance. */ @@ -35,66 +39,66 @@ public ApartmentComplex build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Appearance.java b/src/main/java/org/schema/Appearance.java index 5d9159f6..69202ae2 100644 --- a/src/main/java/org/schema/Appearance.java +++ b/src/main/java/org/schema/Appearance.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Appearance. */ @@ -25,7 +29,7 @@ public class Appearance { /** * Builder for {@link Appearance} */ - public static final class AppearanceThingBuilder implements Builder { + static final class AppearanceThingBuilder implements Builder { /** * Creates new {@link Appearance} instance. */ @@ -34,7 +38,7 @@ public Appearance build() { } } public interface Builder extends ThingBuilder { - + } protected Appearance() { diff --git a/src/main/java/org/schema/AppendAction.java b/src/main/java/org/schema/AppendAction.java index 30ce4212..797cb570 100644 --- a/src/main/java/org/schema/AppendAction.java +++ b/src/main/java/org/schema/AppendAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of inserting at the end if an ordered collection. */ @@ -25,7 +29,7 @@ public class AppendAction extends InsertAction { /** * Builder for {@link AppendAction} */ - public static final class AppendActionThingBuilder implements Builder { + static final class AppendActionThingBuilder implements Builder { /** * Creates new {@link AppendAction} instance. */ @@ -35,33 +39,33 @@ public AppendAction build() { /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing thing) { + @NotNull public Builder targetCollection(Thing thing) { this.targetCollection = thing; return this; } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing.Builder thing) { + @NotNull public Builder targetCollection(Thing.Builder thing) { return this.targetCollection(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -69,13 +73,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -83,7 +87,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -91,7 +95,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -100,67 +104,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -194,7 +198,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -229,7 +233,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -270,38 +274,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -327,34 +331,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder targetCollection(Thing thing); - Builder targetCollection(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder targetCollection(Thing thing); + @NotNull Builder targetCollection(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ApplyAction.java b/src/main/java/org/schema/ApplyAction.java index 343226e5..4bf4fdd6 100644 --- a/src/main/java/org/schema/ApplyAction.java +++ b/src/main/java/org/schema/ApplyAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of registering to an organization/service without the guarantee to receive it.

Related actions:

  • RegisterAction: Unlike RegisterAction, ApplyAction has no guarantees that the application will be accepted
. */ @@ -25,7 +29,7 @@ public class ApplyAction extends OrganizeAction { /** * Builder for {@link ApplyAction} */ - public static final class ApplyActionThingBuilder implements Builder { + static final class ApplyActionThingBuilder implements Builder { /** * Creates new {@link ApplyAction} instance. */ @@ -35,7 +39,7 @@ public ApplyAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ApprovedIndication.java b/src/main/java/org/schema/ApprovedIndication.java index b0d71d4b..fe5e3f9b 100644 --- a/src/main/java/org/schema/ApprovedIndication.java +++ b/src/main/java/org/schema/ApprovedIndication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An indication for a medical therapy that has been formally specified or approved by a regulatory body that regulates use of the therapy; for example, the US FDA approves indications for most drugs in the US. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class ApprovedIndication extends MedicalIndication { /** * Builder for {@link ApprovedIndication} */ - public static final class ApprovedIndicationThingBuilder implements Builder { + static final class ApprovedIndicationThingBuilder implements Builder { /** * Creates new {@link ApprovedIndication} instance. */ @@ -36,99 +40,99 @@ public ApprovedIndication build() { /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -162,7 +166,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -197,7 +201,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -230,7 +234,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -238,38 +242,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -293,30 +297,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Aquarium.java b/src/main/java/org/schema/Aquarium.java index 4b57669d..49b3694b 100644 --- a/src/main/java/org/schema/Aquarium.java +++ b/src/main/java/org/schema/Aquarium.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Aquarium. */ @@ -25,7 +29,7 @@ public class Aquarium extends CivicStructure { /** * Builder for {@link Aquarium} */ - public static final class AquariumThingBuilder implements Builder { + static final class AquariumThingBuilder implements Builder { /** * Creates new {@link Aquarium} instance. */ @@ -35,73 +39,73 @@ public Aquarium build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ArriveAction.java b/src/main/java/org/schema/ArriveAction.java index 654f1e0e..cbdcf80d 100644 --- a/src/main/java/org/schema/ArriveAction.java +++ b/src/main/java/org/schema/ArriveAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of arriving at a place. An agent arrives at a destination from an fromLocation, optionally with participants. */ @@ -25,7 +29,7 @@ public class ArriveAction extends MoveAction { /** * Builder for {@link ArriveAction} */ - public static final class ArriveActionThingBuilder implements Builder { + static final class ArriveActionThingBuilder implements Builder { /** * Creates new {@link ArriveAction} instance. */ @@ -35,33 +39,33 @@ public ArriveAction build() { /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -69,13 +73,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -83,7 +87,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -91,7 +95,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -100,67 +104,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -194,7 +198,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -229,7 +233,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -270,38 +274,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -327,34 +331,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ArtGallery.java b/src/main/java/org/schema/ArtGallery.java index 61a7ebcb..e85558b1 100644 --- a/src/main/java/org/schema/ArtGallery.java +++ b/src/main/java/org/schema/ArtGallery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An art gallery. */ @@ -25,7 +29,7 @@ public class ArtGallery extends EntertainmentBusiness { /** * Builder for {@link ArtGallery} */ - public static final class ArtGalleryThingBuilder implements Builder { + static final class ArtGalleryThingBuilder implements Builder { /** * Creates new {@link ArtGallery} instance. */ @@ -35,107 +39,107 @@ public ArtGallery build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Artery.java b/src/main/java/org/schema/Artery.java index f09111f5..fd353969 100644 --- a/src/main/java/org/schema/Artery.java +++ b/src/main/java/org/schema/Artery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A type of blood vessel that specifically carries blood away from the heart. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -44,7 +48,7 @@ public AnatomicalStructure getSupplyTo() { /** * Builder for {@link Artery} */ - public static final class ArteryThingBuilder implements Builder { + static final class ArteryThingBuilder implements Builder { /** * Creates new {@link Artery} instance. */ @@ -54,231 +58,231 @@ public Artery build() { /** * The branches that comprise the arterial structure. */ - public Builder arterialBranch(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder arterialBranch(AnatomicalStructure anatomicalStructure) { this.arterialBranch = anatomicalStructure; return this; } /** * The branches that comprise the arterial structure. */ - public Builder arterialBranch(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder arterialBranch(AnatomicalStructure.Builder anatomicalStructure) { return this.arterialBranch(anatomicalStructure.build()); } /** * The anatomical or organ system that the artery originates from. */ - public Builder source(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder source(AnatomicalStructure anatomicalStructure) { this.source = anatomicalStructure; return this; } /** * The anatomical or organ system that the artery originates from. */ - public Builder source(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder source(AnatomicalStructure.Builder anatomicalStructure) { return this.source(anatomicalStructure.build()); } /** * The area to which the artery supplies blood. */ - public Builder supplyTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder supplyTo(AnatomicalStructure anatomicalStructure) { this.supplyTo = anatomicalStructure; return this; } /** * The area to which the artery supplies blood. */ - public Builder supplyTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder supplyTo(AnatomicalStructure.Builder anatomicalStructure) { return this.supplyTo(anatomicalStructure.build()); } /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -312,7 +316,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -347,7 +351,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -380,7 +384,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -388,38 +392,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -455,50 +459,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder arterialBranch(AnatomicalStructure anatomicalStructure); - Builder arterialBranch(AnatomicalStructure.Builder anatomicalStructure); - Builder source(AnatomicalStructure anatomicalStructure); - Builder source(AnatomicalStructure.Builder anatomicalStructure); - Builder supplyTo(AnatomicalStructure anatomicalStructure); - Builder supplyTo(AnatomicalStructure.Builder anatomicalStructure); - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder arterialBranch(AnatomicalStructure anatomicalStructure); + @NotNull Builder arterialBranch(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder source(AnatomicalStructure anatomicalStructure); + @NotNull Builder source(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder supplyTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder supplyTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Artery(AnatomicalStructure arterialBranch, AnatomicalStructure source, AnatomicalStructure supplyTo, 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) { diff --git a/src/main/java/org/schema/Article.java b/src/main/java/org/schema/Article.java index 129dd0c2..abe975d9 100644 --- a/src/main/java/org/schema/Article.java +++ b/src/main/java/org/schema/Article.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An article, such as a news article or piece of investigative report. Newspapers and magazines have articles of many different types and this is intended to cover them all. * @@ -40,19 +44,19 @@ public String getArticleSection() { /** * The number of words in the text of the Article. */ - public Integer getWordCount() { + public int getWordCount() { return myWordCount; } /** * The page on which the work ends; for example "138" or "xvi". */ - public IntegerOrString getPageEnd() { + public StringOrInt getPageEnd() { return myPageEnd; } /** * The page on which the work starts; for example "135" or "xiii". */ - public IntegerOrString getPageStart() { + public StringOrInt getPageStart() { return myPageStart; } /** @@ -64,7 +68,7 @@ public String getPagination() { /** * Builder for {@link Article} */ - public static final class ArticleThingBuilder implements Builder { + static final class ArticleThingBuilder implements Builder { /** * Creates new {@link Article} instance. */ @@ -74,187 +78,187 @@ public Article build() { /** * The actual body of the article. */ - public Builder articleBody(String articleBody) { + @NotNull public Builder articleBody(String articleBody) { this.articleBody = articleBody; return this; } /** * Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. */ - public Builder articleSection(String articleSection) { + @NotNull public Builder articleSection(String articleSection) { this.articleSection = articleSection; return this; } /** * The number of words in the text of the Article. */ - public Builder wordCount(Integer integer) { - this.wordCount = integer; + @NotNull public Builder wordCount(int wordCount) { + this.wordCount = wordCount; return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -262,13 +266,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -276,20 +280,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -297,13 +301,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -311,40 +315,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -352,13 +356,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -366,13 +370,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -380,13 +384,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -394,21 +398,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -416,7 +420,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -424,7 +428,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -432,7 +436,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -440,7 +444,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -448,13 +452,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -462,101 +466,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -564,13 +568,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -578,35 +582,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -614,13 +618,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -628,53 +632,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -682,13 +686,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -696,127 +700,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -824,7 +828,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -832,7 +836,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -840,7 +844,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -848,20 +852,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -869,13 +873,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -883,66 +887,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -950,13 +954,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -964,40 +968,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1031,7 +1035,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1066,7 +1070,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1099,7 +1103,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1107,38 +1111,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1147,9 +1151,9 @@ public Builder id(long id) { } private String articleBody; private String articleSection; - private Integer wordCount; - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private int wordCount; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; private String schemaVersion; private Thing about; @@ -1207,7 +1211,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1225,152 +1229,152 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder
{ - Builder articleBody(String articleBody); - Builder articleSection(String articleSection); - Builder wordCount(Integer integer); - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder articleBody(String articleBody); + @NotNull Builder articleSection(String articleSection); + @NotNull Builder wordCount(int wordCount); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Article(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) { + protected Article(String articleBody, String articleSection, int wordCount, StringOrInt pageEnd, StringOrInt 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, int 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); myArticleBody = articleBody; myArticleSection = articleSection; @@ -1381,8 +1385,8 @@ protected Article(String articleBody, String articleSection, Integer wordCount, } private String myArticleBody; private String myArticleSection; - private Integer myWordCount; - private IntegerOrString myPageEnd; - private IntegerOrString myPageStart; + private int myWordCount; + private StringOrInt myPageEnd; + private StringOrInt myPageStart; private String myPagination; } diff --git a/src/main/java/org/schema/AskAction.java b/src/main/java/org/schema/AskAction.java index 61a9f46e..c3d491c3 100644 --- a/src/main/java/org/schema/AskAction.java +++ b/src/main/java/org/schema/AskAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of posing a question / favor to someone.

Related actions:

  • ReplyAction: Appears generally as a response to AskAction
. */ @@ -31,7 +35,7 @@ public Question getQuestion() { /** * Builder for {@link AskAction} */ - public static final class AskActionThingBuilder implements Builder { + static final class AskActionThingBuilder implements Builder { /** * Creates new {@link AskAction} instance. */ @@ -41,33 +45,33 @@ public AskAction build() { /** * A sub property of object. A question. */ - public Builder question(Question question) { + @NotNull public Builder question(Question question) { this.question = question; return this; } /** * A sub property of object. A question. */ - public Builder question(Question.Builder question) { + @NotNull public Builder question(Question.Builder question) { return this.question(question.build()); } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -75,13 +79,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -89,7 +93,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -97,13 +101,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -111,13 +115,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -125,13 +129,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -139,13 +143,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -153,7 +157,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -161,7 +165,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -170,67 +174,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -264,7 +268,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -299,7 +303,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -332,7 +336,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -340,38 +344,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -399,43 +403,43 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder question(Question question); - Builder question(Question.Builder question); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder question(Question question); + @NotNull Builder question(Question.Builder question); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected AskAction(Question question, 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) { diff --git a/src/main/java/org/schema/AssessAction.java b/src/main/java/org/schema/AssessAction.java index e99c0d0d..c8c67e18 100644 --- a/src/main/java/org/schema/AssessAction.java +++ b/src/main/java/org/schema/AssessAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of forming one's opinion, reaction or sentiment. */ @@ -25,7 +29,7 @@ public class AssessAction extends Action { /** * Builder for {@link AssessAction} */ - public static final class AssessActionThingBuilder implements Builder { + static final class AssessActionThingBuilder implements Builder { /** * Creates new {@link AssessAction} instance. */ @@ -35,7 +39,7 @@ public AssessAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AssignAction.java b/src/main/java/org/schema/AssignAction.java index 505945fd..5769def7 100644 --- a/src/main/java/org/schema/AssignAction.java +++ b/src/main/java/org/schema/AssignAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of allocating an action/event/task to some destination (someone or something). */ @@ -25,7 +29,7 @@ public class AssignAction extends AllocateAction { /** * Builder for {@link AssignAction} */ - public static final class AssignActionThingBuilder implements Builder { + static final class AssignActionThingBuilder implements Builder { /** * Creates new {@link AssignAction} instance. */ @@ -35,7 +39,7 @@ public AssignAction build() { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setMedicalDevicePurpose(medicalDevicePurpose); return this; @@ -43,13 +47,13 @@ public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { return this.purpose(medicalDevicePurpose.build()); } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing thing) { + @NotNull public Builder purpose(Thing thing) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setThing(thing); return this; @@ -57,13 +61,13 @@ public Builder purpose(Thing thing) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing.Builder thing) { + @NotNull public Builder purpose(Thing.Builder thing) { return this.purpose(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -71,13 +75,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -85,7 +89,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -93,7 +97,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -102,67 +106,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -196,7 +200,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -231,7 +235,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -264,7 +268,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -272,38 +276,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -328,34 +332,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder purpose(MedicalDevicePurpose medicalDevicePurpose); - Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); - Builder purpose(Thing thing); - Builder purpose(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder purpose(MedicalDevicePurpose medicalDevicePurpose); + @NotNull Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); + @NotNull Builder purpose(Thing thing); + @NotNull Builder purpose(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Attorney.java b/src/main/java/org/schema/Attorney.java index b4a1e3c5..b416c8b0 100644 --- a/src/main/java/org/schema/Attorney.java +++ b/src/main/java/org/schema/Attorney.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Professional service: Attorney. */ @@ -25,7 +29,7 @@ public class Attorney extends ProfessionalService { /** * Builder for {@link Attorney} */ - public static final class AttorneyThingBuilder implements Builder { + static final class AttorneyThingBuilder implements Builder { /** * Creates new {@link Attorney} instance. */ @@ -35,107 +39,107 @@ public Attorney build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Audience.java b/src/main/java/org/schema/Audience.java index c3db0af7..e6076ba9 100644 --- a/src/main/java/org/schema/Audience.java +++ b/src/main/java/org/schema/Audience.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Intended audience for an item, i.e. the group for whom the item was created. */ @@ -37,7 +41,7 @@ public AdministrativeArea getGeographicArea() { /** * Builder for {@link Audience} */ - public static final class AudienceThingBuilder implements Builder { + static final class AudienceThingBuilder implements Builder { /** * Creates new {@link Audience} instance. */ @@ -47,41 +51,41 @@ public Audience build() { /** * The target group associated with a given audience (e.g. veterans, car owners, musicians, etc.). */ - public Builder audienceType(String audienceType) { + @NotNull public Builder audienceType(String audienceType) { this.audienceType = audienceType; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea administrativeArea) { this.geographicArea = administrativeArea; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { return this.geographicArea(administrativeArea.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -115,7 +119,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -150,7 +154,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -183,7 +187,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -191,38 +195,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -242,21 +246,21 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder audienceType(String audienceType); - Builder geographicArea(AdministrativeArea administrativeArea); - Builder geographicArea(AdministrativeArea.Builder administrativeArea); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder audienceType(String audienceType); + @NotNull Builder geographicArea(AdministrativeArea administrativeArea); + @NotNull Builder geographicArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Audience(String audienceType, AdministrativeArea geographicArea, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/AudienceOrOrganizationOrPerson.java b/src/main/java/org/schema/AudienceOrOrganizationOrPerson.java index 336d23f3..f944e72b 100644 --- a/src/main/java/org/schema/AudienceOrOrganizationOrPerson.java +++ b/src/main/java/org/schema/AudienceOrOrganizationOrPerson.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class AudienceOrOrganizationOrPerson { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myAudience != null) return myAudience; if (myOrganization != null) return myOrganization; @@ -35,12 +38,12 @@ public Thing getThing() { } public void setAudience(Audience audience) { clear(); myAudience = audience; } public Audience getAudience() { return myAudience; } - private Audience myAudience; public void setOrganization(Organization organization) { clear(); myOrganization = organization; } public Organization getOrganization() { return myOrganization; } - private Organization myOrganization; public void setPerson(Person person) { clear(); myPerson = person; } public Person getPerson() { return myPerson; } + private Audience myAudience; + private Organization myOrganization; private Person myPerson; private void clear() { myAudience = null; diff --git a/src/main/java/org/schema/AudioObject.java b/src/main/java/org/schema/AudioObject.java index 9886fbed..5705f291 100644 --- a/src/main/java/org/schema/AudioObject.java +++ b/src/main/java/org/schema/AudioObject.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An audio file. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews @@ -32,7 +36,7 @@ public String getTranscript() { /** * Builder for {@link AudioObject} */ - public static final class AudioObjectThingBuilder implements Builder { + static final class AudioObjectThingBuilder implements Builder { /** * Creates new {@link AudioObject} instance. */ @@ -42,95 +46,95 @@ public AudioObject build() { /** * If this MediaObject is an AudioObject or VideoObject, the transcript of that object. */ - public Builder transcript(String transcript) { + @NotNull public Builder transcript(String transcript) { this.transcript = transcript; return this; } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle newsArticle) { this.associatedArticle = newsArticle; return this; } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle.Builder newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle.Builder newsArticle) { return this.associatedArticle(newsArticle.build()); } /** * The bitrate of the media object. */ - public Builder bitrate(String bitrate) { + @NotNull public Builder bitrate(String bitrate) { this.bitrate = bitrate; return this; } /** * File size in (mega/kilo) bytes. */ - public Builder contentSize(String contentSize) { + @NotNull public Builder contentSize(String contentSize) { this.contentSize = contentSize; return this; } /** * Actual bytes of the media object, for example the image file or video file. */ - public Builder contentUrl(String contentUrl) { + @NotNull public Builder contentUrl(String contentUrl) { this.contentUrl = contentUrl; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * A URL pointing to a player for a specific video. In general, this is the information in the src element of an embed tag and should not be the same as the content of the loc tag. */ - public Builder embedUrl(String embedUrl) { + @NotNull public Builder embedUrl(String embedUrl) { this.embedUrl = embedUrl; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork creativeWork) { this.encodesCreativeWork = creativeWork; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { return this.encodesCreativeWork(creativeWork.build()); } /** * mp3, mpeg4, etc. */ - public Builder encodingFormat(String encodingFormat) { + @NotNull public Builder encodingFormat(String encodingFormat) { this.encodingFormat = encodingFormat; return this; } /** * Date the content expires and is no longer useful or available. Useful for videos. */ - public Builder expires(java.util.Date date) { + @NotNull public Builder expires(java.util.Date date) { this.expires = date; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -138,13 +142,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -152,60 +156,60 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * Player type required—for example, Flash or Silverlight. */ - public Builder playerType(String playerType) { + @NotNull public Builder playerType(String playerType) { this.playerType = playerType; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place place) { + @NotNull public Builder regionsAllowed(Place place) { this.regionsAllowed = place; return this; } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place.Builder place) { + @NotNull public Builder regionsAllowed(Place.Builder place) { return this.regionsAllowed(place.build()); } /** * Indicates if use of the media require a subscription (either paid or free). Allowed values are true or false (note that an earlier version had 'yes', 'no'). */ - public Builder requiresSubscription(Boolean requiresSubscription) { + @NotNull public Builder requiresSubscription(Boolean requiresSubscription) { this.requiresSubscription = requiresSubscription; return this; } /** * Date when this media object was uploaded to this site. */ - public Builder uploadDate(java.util.Date date) { + @NotNull public Builder uploadDate(java.util.Date date) { this.uploadDate = date; return this; } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -213,13 +217,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -227,133 +231,133 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -361,13 +365,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -375,20 +379,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -396,13 +400,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -410,40 +414,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -451,13 +455,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -465,13 +469,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -479,13 +483,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -493,21 +497,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -515,7 +519,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -523,7 +527,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -531,7 +535,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -539,7 +543,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -547,13 +551,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -561,101 +565,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -663,13 +667,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -677,35 +681,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -713,13 +717,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -727,53 +731,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -781,13 +785,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -795,127 +799,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -923,7 +927,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -931,7 +935,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -939,7 +943,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -947,20 +951,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -968,13 +972,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -982,66 +986,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1049,13 +1053,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1063,40 +1067,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1130,7 +1134,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1165,7 +1169,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1198,7 +1202,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1206,38 +1210,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1317,7 +1321,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1335,172 +1339,172 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder transcript(String transcript); - Builder associatedArticle(NewsArticle newsArticle); - Builder associatedArticle(NewsArticle.Builder newsArticle); - Builder bitrate(String bitrate); - Builder contentSize(String contentSize); - Builder contentUrl(String contentUrl); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder embedUrl(String embedUrl); - Builder encodesCreativeWork(CreativeWork creativeWork); - Builder encodesCreativeWork(CreativeWork.Builder creativeWork); - Builder encodingFormat(String encodingFormat); - Builder expires(java.util.Date date); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder playerType(String playerType); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder regionsAllowed(Place place); - Builder regionsAllowed(Place.Builder place); - Builder requiresSubscription(Boolean requiresSubscription); - Builder uploadDate(java.util.Date date); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder transcript(String transcript); + @NotNull Builder associatedArticle(NewsArticle newsArticle); + @NotNull Builder associatedArticle(NewsArticle.Builder newsArticle); + @NotNull Builder bitrate(String bitrate); + @NotNull Builder contentSize(String contentSize); + @NotNull Builder contentUrl(String contentUrl); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder embedUrl(String embedUrl); + @NotNull Builder encodesCreativeWork(CreativeWork creativeWork); + @NotNull Builder encodesCreativeWork(CreativeWork.Builder creativeWork); + @NotNull Builder encodingFormat(String encodingFormat); + @NotNull Builder expires(java.util.Date date); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder playerType(String playerType); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder regionsAllowed(Place place); + @NotNull Builder regionsAllowed(Place.Builder place); + @NotNull Builder requiresSubscription(Boolean requiresSubscription); + @NotNull Builder uploadDate(java.util.Date date); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected AudioObject(String transcript, 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) { + protected AudioObject(String transcript, 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, int 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); myTranscript = transcript; } diff --git a/src/main/java/org/schema/AuthorizeAction.java b/src/main/java/org/schema/AuthorizeAction.java index 80a72afd..a2ef1d7c 100644 --- a/src/main/java/org/schema/AuthorizeAction.java +++ b/src/main/java/org/schema/AuthorizeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of granting permission to an object. */ @@ -31,7 +35,7 @@ public AudienceOrOrganizationOrPerson getRecipient() { /** * Builder for {@link AuthorizeAction} */ - public static final class AuthorizeActionThingBuilder implements Builder { + static final class AuthorizeActionThingBuilder implements Builder { /** * Creates new {@link AuthorizeAction} instance. */ @@ -41,7 +45,7 @@ public AuthorizeAction build() { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -49,13 +53,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -63,13 +67,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -77,13 +81,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setMedicalDevicePurpose(medicalDevicePurpose); return this; @@ -91,13 +95,13 @@ public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { return this.purpose(medicalDevicePurpose.build()); } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing thing) { + @NotNull public Builder purpose(Thing thing) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setThing(thing); return this; @@ -105,13 +109,13 @@ public Builder purpose(Thing thing) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing.Builder thing) { + @NotNull public Builder purpose(Thing.Builder thing) { return this.purpose(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -119,13 +123,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -133,7 +137,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -141,7 +145,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -150,67 +154,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -244,7 +248,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -279,7 +283,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -312,7 +316,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -320,38 +324,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -377,40 +381,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder purpose(MedicalDevicePurpose medicalDevicePurpose); - Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); - Builder purpose(Thing thing); - Builder purpose(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder purpose(MedicalDevicePurpose medicalDevicePurpose); + @NotNull Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); + @NotNull Builder purpose(Thing thing); + @NotNull Builder purpose(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected AuthorizeAction(AudienceOrOrganizationOrPerson recipient, 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) { diff --git a/src/main/java/org/schema/AutoBodyShop.java b/src/main/java/org/schema/AutoBodyShop.java index f463cf52..b37e5e3d 100644 --- a/src/main/java/org/schema/AutoBodyShop.java +++ b/src/main/java/org/schema/AutoBodyShop.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Auto body shop. */ @@ -25,7 +29,7 @@ public class AutoBodyShop extends AutomotiveBusiness { /** * Builder for {@link AutoBodyShop} */ - public static final class AutoBodyShopThingBuilder implements Builder { + static final class AutoBodyShopThingBuilder implements Builder { /** * Creates new {@link AutoBodyShop} instance. */ @@ -35,107 +39,107 @@ public AutoBodyShop build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AutoDealer.java b/src/main/java/org/schema/AutoDealer.java index ebfcb55b..fe0b5bf3 100644 --- a/src/main/java/org/schema/AutoDealer.java +++ b/src/main/java/org/schema/AutoDealer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An car dealership. */ @@ -25,7 +29,7 @@ public class AutoDealer extends AutomotiveBusiness { /** * Builder for {@link AutoDealer} */ - public static final class AutoDealerThingBuilder implements Builder { + static final class AutoDealerThingBuilder implements Builder { /** * Creates new {@link AutoDealer} instance. */ @@ -35,107 +39,107 @@ public AutoDealer build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AutoPartsStore.java b/src/main/java/org/schema/AutoPartsStore.java index 6ae3f928..f7226647 100644 --- a/src/main/java/org/schema/AutoPartsStore.java +++ b/src/main/java/org/schema/AutoPartsStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An auto parts store. */ @@ -25,7 +29,7 @@ public class AutoPartsStore extends Store { /** * Builder for {@link AutoPartsStore} */ - public static final class AutoPartsStoreThingBuilder implements Builder { + static final class AutoPartsStoreThingBuilder implements Builder { /** * Creates new {@link AutoPartsStore} instance. */ @@ -35,107 +39,107 @@ public AutoPartsStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AutoRental.java b/src/main/java/org/schema/AutoRental.java index ca77841a..9d720164 100644 --- a/src/main/java/org/schema/AutoRental.java +++ b/src/main/java/org/schema/AutoRental.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A car rental business. */ @@ -25,7 +29,7 @@ public class AutoRental extends AutomotiveBusiness { /** * Builder for {@link AutoRental} */ - public static final class AutoRentalThingBuilder implements Builder { + static final class AutoRentalThingBuilder implements Builder { /** * Creates new {@link AutoRental} instance. */ @@ -35,107 +39,107 @@ public AutoRental build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AutoRepair.java b/src/main/java/org/schema/AutoRepair.java index cc4845af..ca3da290 100644 --- a/src/main/java/org/schema/AutoRepair.java +++ b/src/main/java/org/schema/AutoRepair.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Car repair business. */ @@ -25,7 +29,7 @@ public class AutoRepair extends AutomotiveBusiness { /** * Builder for {@link AutoRepair} */ - public static final class AutoRepairThingBuilder implements Builder { + static final class AutoRepairThingBuilder implements Builder { /** * Creates new {@link AutoRepair} instance. */ @@ -35,107 +39,107 @@ public AutoRepair build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AutoWash.java b/src/main/java/org/schema/AutoWash.java index c402465d..7a77933a 100644 --- a/src/main/java/org/schema/AutoWash.java +++ b/src/main/java/org/schema/AutoWash.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A car wash business. */ @@ -25,7 +29,7 @@ public class AutoWash extends AutomotiveBusiness { /** * Builder for {@link AutoWash} */ - public static final class AutoWashThingBuilder implements Builder { + static final class AutoWashThingBuilder implements Builder { /** * Creates new {@link AutoWash} instance. */ @@ -35,107 +39,107 @@ public AutoWash build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AutomatedTeller.java b/src/main/java/org/schema/AutomatedTeller.java index eb0f13e1..d132cfdc 100644 --- a/src/main/java/org/schema/AutomatedTeller.java +++ b/src/main/java/org/schema/AutomatedTeller.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * ATM/cash machine. */ @@ -25,7 +29,7 @@ public class AutomatedTeller extends FinancialService { /** * Builder for {@link AutomatedTeller} */ - public static final class AutomatedTellerThingBuilder implements Builder { + static final class AutomatedTellerThingBuilder implements Builder { /** * Creates new {@link AutomatedTeller} instance. */ @@ -35,107 +39,107 @@ public AutomatedTeller build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AutomotiveBusiness.java b/src/main/java/org/schema/AutomotiveBusiness.java index bfd7d3a8..ce92f784 100644 --- a/src/main/java/org/schema/AutomotiveBusiness.java +++ b/src/main/java/org/schema/AutomotiveBusiness.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Car repair, sales, or parts. */ @@ -25,7 +29,7 @@ public class AutomotiveBusiness extends LocalBusiness { /** * Builder for {@link AutomotiveBusiness} */ - public static final class AutomotiveBusinessThingBuilder implements Builder { + static final class AutomotiveBusinessThingBuilder implements Builder { /** * Creates new {@link AutomotiveBusiness} instance. */ @@ -35,107 +39,107 @@ public AutomotiveBusiness build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/AutomotiveOntologyWGClass.java b/src/main/java/org/schema/AutomotiveOntologyWGClass.java index 9cc5fc1b..8eefdf96 100644 --- a/src/main/java/org/schema/AutomotiveOntologyWGClass.java +++ b/src/main/java/org/schema/AutomotiveOntologyWGClass.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This element is based on the work of the Automotive Ontology Working Group, see http://www.automotive-ontology.org for details. Many class and property definitions are inspired by or based on abstracts from Wikipedia, the free encyclopedia. */ @@ -25,7 +29,7 @@ public class AutomotiveOntologyWGClass { /** * Builder for {@link AutomotiveOntologyWGClass} */ - public static final class AutomotiveOntologyWGClassThingBuilder implements Builder { + static final class AutomotiveOntologyWGClassThingBuilder implements Builder { /** * Creates new {@link AutomotiveOntologyWGClass} instance. */ @@ -34,7 +38,7 @@ public AutomotiveOntologyWGClass build() { } } public interface Builder extends ThingBuilder { - + } protected AutomotiveOntologyWGClass() { diff --git a/src/main/java/org/schema/Ayurvedic.java b/src/main/java/org/schema/Ayurvedic.java index 94c6870d..c10256d6 100644 --- a/src/main/java/org/schema/Ayurvedic.java +++ b/src/main/java/org/schema/Ayurvedic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A system of medicine that originated in India over thousands of years and that focuses on integrating and balancing the body, mind, and spirit. */ @@ -25,7 +29,7 @@ public class Ayurvedic { /** * Builder for {@link Ayurvedic} */ - public static final class AyurvedicThingBuilder implements Builder { + static final class AyurvedicThingBuilder implements Builder { /** * Creates new {@link Ayurvedic} instance. */ @@ -34,7 +38,7 @@ public Ayurvedic build() { } } public interface Builder extends ThingBuilder { - + } protected Ayurvedic() { diff --git a/src/main/java/org/schema/Bacteria.java b/src/main/java/org/schema/Bacteria.java index 2bd1b9aa..b59ddcc1 100644 --- a/src/main/java/org/schema/Bacteria.java +++ b/src/main/java/org/schema/Bacteria.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Pathogenic bacteria that cause bacterial infection. */ @@ -25,7 +29,7 @@ public class Bacteria { /** * Builder for {@link Bacteria} */ - public static final class BacteriaThingBuilder implements Builder { + static final class BacteriaThingBuilder implements Builder { /** * Creates new {@link Bacteria} instance. */ @@ -34,7 +38,7 @@ public Bacteria build() { } } public interface Builder extends ThingBuilder { - + } protected Bacteria() { diff --git a/src/main/java/org/schema/Bakery.java b/src/main/java/org/schema/Bakery.java index 97aa6560..8f2b5ee4 100644 --- a/src/main/java/org/schema/Bakery.java +++ b/src/main/java/org/schema/Bakery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A bakery. */ @@ -25,7 +29,7 @@ public class Bakery extends FoodEstablishment { /** * Builder for {@link Bakery} */ - public static final class BakeryThingBuilder implements Builder { + static final class BakeryThingBuilder implements Builder { /** * Creates new {@link Bakery} instance. */ @@ -35,7 +39,7 @@ public Bakery build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -43,7 +47,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -51,121 +55,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -527,60 +531,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Balance.java b/src/main/java/org/schema/Balance.java index ac538a59..698256fb 100644 --- a/src/main/java/org/schema/Balance.java +++ b/src/main/java/org/schema/Balance.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Physical activity that is engaged to help maintain posture and balance. */ @@ -25,7 +29,7 @@ public class Balance { /** * Builder for {@link Balance} */ - public static final class BalanceThingBuilder implements Builder { + static final class BalanceThingBuilder implements Builder { /** * Creates new {@link Balance} instance. */ @@ -34,7 +38,7 @@ public Balance build() { } } public interface Builder extends ThingBuilder { - + } protected Balance() { diff --git a/src/main/java/org/schema/BankOrCreditUnion.java b/src/main/java/org/schema/BankOrCreditUnion.java index 298e8f5f..11d38d7a 100644 --- a/src/main/java/org/schema/BankOrCreditUnion.java +++ b/src/main/java/org/schema/BankOrCreditUnion.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Bank or credit union. */ @@ -25,7 +29,7 @@ public class BankOrCreditUnion extends FinancialService { /** * Builder for {@link BankOrCreditUnion} */ - public static final class BankOrCreditUnionThingBuilder implements Builder { + static final class BankOrCreditUnionThingBuilder implements Builder { /** * Creates new {@link BankOrCreditUnion} instance. */ @@ -35,107 +39,107 @@ public BankOrCreditUnion build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BarOrPub.java b/src/main/java/org/schema/BarOrPub.java index 6e63e3e0..a271fbd1 100644 --- a/src/main/java/org/schema/BarOrPub.java +++ b/src/main/java/org/schema/BarOrPub.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A bar or pub. */ @@ -25,7 +29,7 @@ public class BarOrPub extends FoodEstablishment { /** * Builder for {@link BarOrPub} */ - public static final class BarOrPubThingBuilder implements Builder { + static final class BarOrPubThingBuilder implements Builder { /** * Creates new {@link BarOrPub} instance. */ @@ -35,7 +39,7 @@ public BarOrPub build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -43,7 +47,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -51,121 +55,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -527,60 +531,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Beach.java b/src/main/java/org/schema/Beach.java index 3d056732..57e7b4ff 100644 --- a/src/main/java/org/schema/Beach.java +++ b/src/main/java/org/schema/Beach.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Beach. */ @@ -25,7 +29,7 @@ public class Beach extends CivicStructure { /** * Builder for {@link Beach} */ - public static final class BeachThingBuilder implements Builder { + static final class BeachThingBuilder implements Builder { /** * Creates new {@link Beach} instance. */ @@ -35,73 +39,73 @@ public Beach build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BeautySalon.java b/src/main/java/org/schema/BeautySalon.java index c134bbbd..140b0ced 100644 --- a/src/main/java/org/schema/BeautySalon.java +++ b/src/main/java/org/schema/BeautySalon.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Beauty salon. */ @@ -25,7 +29,7 @@ public class BeautySalon extends HealthAndBeautyBusiness { /** * Builder for {@link BeautySalon} */ - public static final class BeautySalonThingBuilder implements Builder { + static final class BeautySalonThingBuilder implements Builder { /** * Creates new {@link BeautySalon} instance. */ @@ -35,107 +39,107 @@ public BeautySalon build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BedAndBreakfast.java b/src/main/java/org/schema/BedAndBreakfast.java index 730420b7..12d577c1 100644 --- a/src/main/java/org/schema/BedAndBreakfast.java +++ b/src/main/java/org/schema/BedAndBreakfast.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Bed and breakfast. */ @@ -25,7 +29,7 @@ public class BedAndBreakfast extends LodgingBusiness { /** * Builder for {@link BedAndBreakfast} */ - public static final class BedAndBreakfastThingBuilder implements Builder { + static final class BedAndBreakfastThingBuilder implements Builder { /** * Creates new {@link BedAndBreakfast} instance. */ @@ -35,107 +39,107 @@ public BedAndBreakfast build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BefriendAction.java b/src/main/java/org/schema/BefriendAction.java index 63887c94..32624ebf 100644 --- a/src/main/java/org/schema/BefriendAction.java +++ b/src/main/java/org/schema/BefriendAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of forming a personal connection with someone (object) mutually/bidirectionally/symmetrically.

Related actions:

  • FollowAction: Unlike FollowAction, BefriendAction implies that the connection is reciprocal
. */ @@ -25,7 +29,7 @@ public class BefriendAction extends InteractAction { /** * Builder for {@link BefriendAction} */ - public static final class BefriendActionThingBuilder implements Builder { + static final class BefriendActionThingBuilder implements Builder { /** * Creates new {@link BefriendAction} instance. */ @@ -35,7 +39,7 @@ public BefriendAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BibExTerm.java b/src/main/java/org/schema/BibExTerm.java index beaf7242..bf29458d 100644 --- a/src/main/java/org/schema/BibExTerm.java +++ b/src/main/java/org/schema/BibExTerm.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The W3C Schema Bib Extend (BibEx) group led the work to improve schema.org for bibliographic information, including terms for periodicals, articles and multi-volume works. The design was inspired in places (e.g. pageStart, pageEnd, pagination) by the Bibliographic Ontology, 'bibo'. */ @@ -25,7 +29,7 @@ public class BibExTerm { /** * Builder for {@link BibExTerm} */ - public static final class BibExTermThingBuilder implements Builder { + static final class BibExTermThingBuilder implements Builder { /** * Creates new {@link BibExTerm} instance. */ @@ -34,7 +38,7 @@ public BibExTerm build() { } } public interface Builder extends ThingBuilder { - + } protected BibExTerm() { diff --git a/src/main/java/org/schema/BikeStore.java b/src/main/java/org/schema/BikeStore.java index 21284edd..a41ce456 100644 --- a/src/main/java/org/schema/BikeStore.java +++ b/src/main/java/org/schema/BikeStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A bike store. */ @@ -25,7 +29,7 @@ public class BikeStore extends Store { /** * Builder for {@link BikeStore} */ - public static final class BikeStoreThingBuilder implements Builder { + static final class BikeStoreThingBuilder implements Builder { /** * Creates new {@link BikeStore} instance. */ @@ -35,107 +39,107 @@ public BikeStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Blog.java b/src/main/java/org/schema/Blog.java index 56de1aaa..1c36072c 100644 --- a/src/main/java/org/schema/Blog.java +++ b/src/main/java/org/schema/Blog.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A blog. */ @@ -31,7 +35,7 @@ public BlogPosting getBlogPost() { /** * Builder for {@link Blog} */ - public static final class BlogThingBuilder implements Builder { + static final class BlogThingBuilder implements Builder { /** * Creates new {@link Blog} instance. */ @@ -41,140 +45,140 @@ public Blog build() { /** * A posting that is part of this blog. */ - public Builder blogPost(BlogPosting blogPosting) { + @NotNull public Builder blogPost(BlogPosting blogPosting) { this.blogPost = blogPosting; return this; } /** * A posting that is part of this blog. */ - public Builder blogPost(BlogPosting.Builder blogPosting) { + @NotNull public Builder blogPost(BlogPosting.Builder blogPosting) { return this.blogPost(blogPosting.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -182,13 +186,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -196,20 +200,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -217,13 +221,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -231,40 +235,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -272,13 +276,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -286,13 +290,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -300,13 +304,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -314,21 +318,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -336,7 +340,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -344,7 +348,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -352,7 +356,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -360,7 +364,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -368,13 +372,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -382,101 +386,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -484,13 +488,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -498,35 +502,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -534,13 +538,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -548,53 +552,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -602,13 +606,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -616,127 +620,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -744,7 +748,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -752,7 +756,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -760,7 +764,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -768,20 +772,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -789,13 +793,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -803,66 +807,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -870,13 +874,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -884,40 +888,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -951,7 +955,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -986,7 +990,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1019,7 +1023,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1027,38 +1031,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1122,7 +1126,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1140,146 +1144,146 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder blogPost(BlogPosting blogPosting); - Builder blogPost(BlogPosting.Builder blogPosting); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder blogPost(BlogPosting blogPosting); + @NotNull Builder blogPost(BlogPosting.Builder blogPosting); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Blog(BlogPosting blogPost, 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) { + protected Blog(BlogPosting blogPost, 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, int 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); myBlogPost = blogPost; } diff --git a/src/main/java/org/schema/BlogPosting.java b/src/main/java/org/schema/BlogPosting.java index d6c75f40..2893c98f 100644 --- a/src/main/java/org/schema/BlogPosting.java +++ b/src/main/java/org/schema/BlogPosting.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A blog post. */ @@ -25,7 +29,7 @@ public class BlogPosting extends Article { /** * Builder for {@link BlogPosting} */ - public static final class BlogPostingThingBuilder implements Builder { + static final class BlogPostingThingBuilder implements Builder { /** * Creates new {@link BlogPosting} instance. */ @@ -35,187 +39,187 @@ public BlogPosting build() { /** * The actual body of the article. */ - public Builder articleBody(String articleBody) { + @NotNull public Builder articleBody(String articleBody) { this.articleBody = articleBody; return this; } /** * Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. */ - public Builder articleSection(String articleSection) { + @NotNull public Builder articleSection(String articleSection) { this.articleSection = articleSection; return this; } /** * The number of words in the text of the Article. */ - public Builder wordCount(Integer integer) { - this.wordCount = integer; + @NotNull public Builder wordCount(int wordCount) { + this.wordCount = wordCount; return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -223,13 +227,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -237,20 +241,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -258,13 +262,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -272,40 +276,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -313,13 +317,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -327,13 +331,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -341,13 +345,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -355,21 +359,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -377,7 +381,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -385,7 +389,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -393,7 +397,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -401,7 +405,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -409,13 +413,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -423,101 +427,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -525,13 +529,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -539,35 +543,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -575,13 +579,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -589,53 +593,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -643,13 +647,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -657,127 +661,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -785,7 +789,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -793,7 +797,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -801,7 +805,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -809,20 +813,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -830,13 +834,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -844,66 +848,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -911,13 +915,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -925,40 +929,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -992,7 +996,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1027,7 +1031,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1060,7 +1064,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1068,38 +1072,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1108,9 +1112,9 @@ public Builder id(long id) { } private String articleBody; private String articleSection; - private Integer wordCount; - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private int wordCount; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; private String schemaVersion; private Thing about; @@ -1168,7 +1172,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1186,152 +1190,152 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder articleBody(String articleBody); - Builder articleSection(String articleSection); - Builder wordCount(Integer integer); - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder articleBody(String articleBody); + @NotNull Builder articleSection(String articleSection); + @NotNull Builder wordCount(int wordCount); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + protected BlogPosting(String articleBody, String articleSection, int wordCount, StringOrInt pageEnd, StringOrInt 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, int 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); } } diff --git a/src/main/java/org/schema/BloodTest.java b/src/main/java/org/schema/BloodTest.java index cc955630..6721c6df 100644 --- a/src/main/java/org/schema/BloodTest.java +++ b/src/main/java/org/schema/BloodTest.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical test performed on a sample of a patient's blood. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class BloodTest extends MedicalTest { /** * Builder for {@link BloodTest} */ - public static final class BloodTestThingBuilder implements Builder { + static final class BloodTestThingBuilder implements Builder { /** * Creates new {@link BloodTest} instance. */ @@ -36,158 +40,158 @@ public BloodTest build() { /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug drug) { + @NotNull public Builder affectedBy(Drug drug) { this.affectedBy = drug; return this; } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug.Builder drug) { + @NotNull public Builder affectedBy(Drug.Builder drug) { return this.affectedBy(drug.build()); } /** * Range of acceptable values for a typical patient, when applicable. */ - public Builder normalRange(String normalRange) { + @NotNull public Builder normalRange(String normalRange) { this.normalRange = normalRange; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign medicalSign) { + @NotNull public Builder signDetected(MedicalSign medicalSign) { this.signDetected = medicalSign; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign.Builder medicalSign) { + @NotNull public Builder signDetected(MedicalSign.Builder medicalSign) { return this.signDetected(medicalSign.build()); } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition medicalCondition) { this.usedToDiagnose = medicalCondition; return this; } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { return this.usedToDiagnose(medicalCondition.build()); } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice medicalDevice) { this.usesDevice = medicalDevice; return this; } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice.Builder medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice.Builder medicalDevice) { return this.usesDevice(medicalDevice.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -221,7 +225,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -256,7 +260,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -289,7 +293,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -297,38 +301,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -357,39 +361,39 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder affectedBy(Drug drug); - Builder affectedBy(Drug.Builder drug); - Builder normalRange(String normalRange); - Builder signDetected(MedicalSign medicalSign); - Builder signDetected(MedicalSign.Builder medicalSign); - Builder usedToDiagnose(MedicalCondition medicalCondition); - Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); - Builder usesDevice(MedicalDevice medicalDevice); - Builder usesDevice(MedicalDevice.Builder medicalDevice); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder affectedBy(Drug drug); + @NotNull Builder affectedBy(Drug.Builder drug); + @NotNull Builder normalRange(String normalRange); + @NotNull Builder signDetected(MedicalSign medicalSign); + @NotNull Builder signDetected(MedicalSign.Builder medicalSign); + @NotNull Builder usedToDiagnose(MedicalCondition medicalCondition); + @NotNull Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); + @NotNull Builder usesDevice(MedicalDevice medicalDevice); + @NotNull Builder usesDevice(MedicalDevice.Builder medicalDevice); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BoardingPolicyType.java b/src/main/java/org/schema/BoardingPolicyType.java index bdeb4dc2..6be18f62 100644 --- a/src/main/java/org/schema/BoardingPolicyType.java +++ b/src/main/java/org/schema/BoardingPolicyType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A type of boarding policy used by an airline. */ @@ -25,7 +29,7 @@ public class BoardingPolicyType extends Enumeration { /** * Builder for {@link BoardingPolicyType} */ - public static final class BoardingPolicyTypeThingBuilder implements Builder { + static final class BoardingPolicyTypeThingBuilder implements Builder { /** * Creates new {@link BoardingPolicyType} instance. */ @@ -35,7 +39,7 @@ public BoardingPolicyType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BoardingPolicyType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/BodyOfWater.java b/src/main/java/org/schema/BodyOfWater.java index 134b5eab..7d845981 100644 --- a/src/main/java/org/schema/BodyOfWater.java +++ b/src/main/java/org/schema/BodyOfWater.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A body of water, such as a sea, ocean, or lake. */ @@ -25,7 +29,7 @@ public class BodyOfWater extends Landform { /** * Builder for {@link BodyOfWater} */ - public static final class BodyOfWaterThingBuilder implements Builder { + static final class BodyOfWaterThingBuilder implements Builder { /** * Creates new {@link BodyOfWater} instance. */ @@ -35,66 +39,66 @@ public BodyOfWater build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Bone.java b/src/main/java/org/schema/Bone.java index 18e79806..098d7aa9 100644 --- a/src/main/java/org/schema/Bone.java +++ b/src/main/java/org/schema/Bone.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Rigid connective tissue that comprises up the skeletal structure of the human body. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class Bone extends AnatomicalStructure { /** * Builder for {@link Bone} */ - public static final class BoneThingBuilder implements Builder { + static final class BoneThingBuilder implements Builder { /** * Creates new {@link Bone} instance. */ @@ -36,192 +40,192 @@ public Bone build() { /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -255,7 +259,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -290,7 +294,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -323,7 +327,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -331,38 +335,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -395,44 +399,44 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Book.java b/src/main/java/org/schema/Book.java index 8fca7171..4aa88aa4 100644 --- a/src/main/java/org/schema/Book.java +++ b/src/main/java/org/schema/Book.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A book. */ @@ -49,13 +53,13 @@ public String getIsbn() { /** * The number of pages in the book. */ - public Integer getNumberOfPages() { + public int getNumberOfPages() { return myNumberOfPages; } /** * Builder for {@link Book} */ - public static final class BookThingBuilder implements Builder { + static final class BookThingBuilder implements Builder { /** * Creates new {@link Book} instance. */ @@ -65,174 +69,174 @@ public Book build() { /** * The edition of the book. */ - public Builder bookEdition(String bookEdition) { + @NotNull public Builder bookEdition(String bookEdition) { this.bookEdition = bookEdition; return this; } /** * The format of the book. */ - public Builder bookFormat(BookFormatType bookFormatType) { + @NotNull public Builder bookFormat(BookFormatType bookFormatType) { this.bookFormat = bookFormatType; return this; } /** * The format of the book. */ - public Builder bookFormat(BookFormatType.Builder bookFormatType) { + @NotNull public Builder bookFormat(BookFormatType.Builder bookFormatType) { return this.bookFormat(bookFormatType.build()); } /** * The illustrator of the book. */ - public Builder illustrator(Person person) { + @NotNull public Builder illustrator(Person person) { this.illustrator = person; return this; } /** * The illustrator of the book. */ - public Builder illustrator(Person.Builder person) { + @NotNull public Builder illustrator(Person.Builder person) { return this.illustrator(person.build()); } /** * The ISBN of the book. */ - public Builder isbn(String isbn) { + @NotNull public Builder isbn(String isbn) { this.isbn = isbn; return this; } /** * The number of pages in the book. */ - public Builder numberOfPages(Integer integer) { - this.numberOfPages = integer; + @NotNull public Builder numberOfPages(int numberOfPages) { + this.numberOfPages = numberOfPages; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -240,13 +244,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -254,20 +258,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -275,13 +279,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -289,40 +293,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -330,13 +334,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -344,13 +348,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -358,13 +362,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -372,21 +376,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -394,7 +398,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -402,7 +406,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -410,7 +414,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -418,7 +422,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -426,13 +430,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -440,101 +444,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -542,13 +546,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -556,35 +560,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -592,13 +596,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -606,53 +610,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -660,13 +664,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -674,127 +678,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -802,7 +806,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -810,7 +814,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -818,7 +822,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -826,20 +830,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -847,13 +851,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -861,66 +865,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -928,13 +932,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -942,40 +946,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1009,7 +1013,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1044,7 +1048,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1085,38 +1089,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1127,7 +1131,7 @@ public Builder id(long id) { private BookFormatType bookFormat; private Person illustrator; private String isbn; - private Integer numberOfPages; + private int numberOfPages; private String schemaVersion; private Thing about; private String accessibilityAPI; @@ -1184,7 +1188,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1202,151 +1206,151 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder bookEdition(String bookEdition); - Builder bookFormat(BookFormatType bookFormatType); - Builder bookFormat(BookFormatType.Builder bookFormatType); - Builder illustrator(Person person); - Builder illustrator(Person.Builder person); - Builder isbn(String isbn); - Builder numberOfPages(Integer integer); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder bookEdition(String bookEdition); + @NotNull Builder bookFormat(BookFormatType bookFormatType); + @NotNull Builder bookFormat(BookFormatType.Builder bookFormatType); + @NotNull Builder illustrator(Person person); + @NotNull Builder illustrator(Person.Builder person); + @NotNull Builder isbn(String isbn); + @NotNull Builder numberOfPages(int numberOfPages); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Book(String bookEdition, BookFormatType bookFormat, Person illustrator, String isbn, Integer numberOfPages, 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) { + protected Book(String bookEdition, BookFormatType bookFormat, Person illustrator, String isbn, int numberOfPages, 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, int 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); myBookEdition = bookEdition; myBookFormat = bookFormat; @@ -1358,5 +1362,5 @@ protected Book(String bookEdition, BookFormatType bookFormat, Person illustrator private BookFormatType myBookFormat; private Person myIllustrator; private String myIsbn; - private Integer myNumberOfPages; + private int myNumberOfPages; } diff --git a/src/main/java/org/schema/BookFormatType.java b/src/main/java/org/schema/BookFormatType.java index 2b61a3ac..3c605040 100644 --- a/src/main/java/org/schema/BookFormatType.java +++ b/src/main/java/org/schema/BookFormatType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The publication format of the book. */ @@ -25,7 +29,7 @@ public class BookFormatType extends Enumeration { /** * Builder for {@link BookFormatType} */ - public static final class BookFormatTypeThingBuilder implements Builder { + static final class BookFormatTypeThingBuilder implements Builder { /** * Creates new {@link BookFormatType} instance. */ @@ -35,7 +39,7 @@ public BookFormatType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BookFormatType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/BookSeries.java b/src/main/java/org/schema/BookSeries.java index e5e573bb..6bb39977 100644 --- a/src/main/java/org/schema/BookSeries.java +++ b/src/main/java/org/schema/BookSeries.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A series of books. Included books can be indicated with the hasPart property. */ @@ -25,7 +29,7 @@ public class BookSeries extends CreativeWorkSeries { /** * Builder for {@link BookSeries} */ - public static final class BookSeriesThingBuilder implements Builder { + static final class BookSeriesThingBuilder implements Builder { /** * Creates new {@link BookSeries} instance. */ @@ -35,141 +39,141 @@ public BookSeries build() { /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -177,13 +181,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -191,20 +195,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -212,13 +216,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -226,40 +230,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -267,13 +271,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -281,13 +285,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -295,13 +299,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -309,21 +313,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -331,7 +335,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -339,7 +343,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -347,7 +351,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -355,7 +359,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -377,101 +381,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -479,13 +483,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -493,35 +497,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -529,13 +533,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -543,53 +547,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -597,13 +601,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -611,127 +615,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -739,7 +743,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -747,7 +751,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -755,7 +759,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -763,20 +767,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -784,13 +788,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -798,66 +802,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -865,13 +869,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -879,40 +883,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -946,7 +950,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -981,7 +985,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1014,7 +1018,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1022,38 +1026,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1118,7 +1122,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1136,146 +1140,146 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder endDate(java.util.Date date); - Builder startDate(java.util.Date date); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/BookStore.java b/src/main/java/org/schema/BookStore.java index 090bb691..527ac763 100644 --- a/src/main/java/org/schema/BookStore.java +++ b/src/main/java/org/schema/BookStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A bookstore. */ @@ -25,7 +29,7 @@ public class BookStore extends Store { /** * Builder for {@link BookStore} */ - public static final class BookStoreThingBuilder implements Builder { + static final class BookStoreThingBuilder implements Builder { /** * Creates new {@link BookStore} instance. */ @@ -35,107 +39,107 @@ public BookStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BookmarkAction.java b/src/main/java/org/schema/BookmarkAction.java index ec528e15..299a49ce 100644 --- a/src/main/java/org/schema/BookmarkAction.java +++ b/src/main/java/org/schema/BookmarkAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent bookmarks/flags/labels/tags/marks an object. */ @@ -25,7 +29,7 @@ public class BookmarkAction extends OrganizeAction { /** * Builder for {@link BookmarkAction} */ - public static final class BookmarkActionThingBuilder implements Builder { + static final class BookmarkActionThingBuilder implements Builder { /** * Creates new {@link BookmarkAction} instance. */ @@ -35,7 +39,7 @@ public BookmarkAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BooleanOrNumberOrStringOrStructuredValue.java b/src/main/java/org/schema/BooleanOrNumberOrStringOrStructuredValue.java index ce5a528d..305e092c 100644 --- a/src/main/java/org/schema/BooleanOrNumberOrStringOrStructuredValue.java +++ b/src/main/java/org/schema/BooleanOrNumberOrStringOrStructuredValue.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class BooleanOrNumberOrStringOrStructuredValue { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myBoolean != null) return myBoolean; if (myNumber != null) return myNumber; @@ -30,15 +33,15 @@ public Object getJsonLdValue() { } 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 Boolean myBoolean; + private Number myNumber; + private String myString; private StructuredValue myStructuredValue; private void clear() { myBoolean = null; diff --git a/src/main/java/org/schema/BooleanOrString.java b/src/main/java/org/schema/BooleanOrString.java index 9a049b3e..c2613188 100644 --- a/src/main/java/org/schema/BooleanOrString.java +++ b/src/main/java/org/schema/BooleanOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class BooleanOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myBoolean != null) return myBoolean; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setBoolean(Boolean value) { clear(); myBoolean = value; } public Boolean getBoolean() { return myBoolean; } - private Boolean myBoolean; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private Boolean myBoolean; private String myString; private void clear() { myBoolean = null; diff --git a/src/main/java/org/schema/BorrowAction.java b/src/main/java/org/schema/BorrowAction.java index 20b33471..f6acc1fd 100644 --- a/src/main/java/org/schema/BorrowAction.java +++ b/src/main/java/org/schema/BorrowAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of obtaining an object under an agreement to return it at a later date. Reciprocal of LendAction.

Related actions:

. */ @@ -31,7 +35,7 @@ public Person getLender() { /** * Builder for {@link BorrowAction} */ - public static final class BorrowActionThingBuilder implements Builder { + static final class BorrowActionThingBuilder implements Builder { /** * Creates new {@link BorrowAction} instance. */ @@ -41,46 +45,46 @@ public BorrowAction build() { /** * A sub property of participant. The person that lends the object being borrowed. */ - public Builder lender(Person person) { + @NotNull public Builder lender(Person person) { this.lender = person; return this; } /** * A sub property of participant. The person that lends the object being borrowed. */ - public Builder lender(Person.Builder person) { + @NotNull public Builder lender(Person.Builder person) { return this.lender(person.build()); } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -88,13 +92,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -102,7 +106,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -110,7 +114,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -119,67 +123,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -213,7 +217,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -248,7 +252,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -281,7 +285,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -289,38 +293,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -347,36 +351,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder lender(Person person); - Builder lender(Person.Builder person); - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder lender(Person person); + @NotNull Builder lender(Person.Builder person); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BorrowAction(Person lender, 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) { diff --git a/src/main/java/org/schema/BowlingAlley.java b/src/main/java/org/schema/BowlingAlley.java index e67ace80..dbe4bf5e 100644 --- a/src/main/java/org/schema/BowlingAlley.java +++ b/src/main/java/org/schema/BowlingAlley.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A bowling alley. */ @@ -25,7 +29,7 @@ public class BowlingAlley extends SportsActivityLocation { /** * Builder for {@link BowlingAlley} */ - public static final class BowlingAlleyThingBuilder implements Builder { + static final class BowlingAlleyThingBuilder implements Builder { /** * Creates new {@link BowlingAlley} instance. */ @@ -35,107 +39,107 @@ public BowlingAlley build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BrainStructure.java b/src/main/java/org/schema/BrainStructure.java index eacfc07c..284f5880 100644 --- a/src/main/java/org/schema/BrainStructure.java +++ b/src/main/java/org/schema/BrainStructure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any anatomical structure which pertains to the soft nervous tissue functioning as the coordinating center of sensation and intellectual and nervous activity. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class BrainStructure extends AnatomicalStructure { /** * Builder for {@link BrainStructure} */ - public static final class BrainStructureThingBuilder implements Builder { + static final class BrainStructureThingBuilder implements Builder { /** * Creates new {@link BrainStructure} instance. */ @@ -36,192 +40,192 @@ public BrainStructure build() { /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -255,7 +259,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -290,7 +294,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -323,7 +327,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -331,38 +335,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -395,44 +399,44 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Brand.java b/src/main/java/org/schema/Brand.java index 950e2792..ef63d612 100644 --- a/src/main/java/org/schema/Brand.java +++ b/src/main/java/org/schema/Brand.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A brand is a name used by an organization or business person for labeling a product, product group, or similar. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -44,7 +48,7 @@ public Review getReview() { /** * Builder for {@link Brand} */ - public static final class BrandThingBuilder implements Builder { + static final class BrandThingBuilder implements Builder { /** * Creates new {@link Brand} instance. */ @@ -54,20 +58,20 @@ public Brand build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -75,13 +79,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -89,34 +93,34 @@ public Builder logo(String logo) { /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -150,7 +154,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -185,7 +189,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -218,7 +222,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -226,38 +230,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -278,25 +282,25 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder review(Review review); - Builder review(Review.Builder review); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Brand(AggregateRating aggregateRating, ImageObjectOrString logo, Review review, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/BrandOrOrganization.java b/src/main/java/org/schema/BrandOrOrganization.java index 01757793..ad5d9565 100644 --- a/src/main/java/org/schema/BrandOrOrganization.java +++ b/src/main/java/org/schema/BrandOrOrganization.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class BrandOrOrganization { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myBrand != null) return myBrand; if (myOrganization != null) return myOrganization; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setBrand(Brand brand) { clear(); myBrand = brand; } public Brand getBrand() { return myBrand; } - private Brand myBrand; public void setOrganization(Organization organization) { clear(); myOrganization = organization; } public Organization getOrganization() { return myOrganization; } + private Brand myBrand; private Organization myOrganization; private void clear() { myBrand = null; diff --git a/src/main/java/org/schema/BreadcrumbList.java b/src/main/java/org/schema/BreadcrumbList.java index 8d294799..665f1f77 100644 --- a/src/main/java/org/schema/BreadcrumbList.java +++ b/src/main/java/org/schema/BreadcrumbList.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * * A BreadcrumbList is an ItemList consisting of a chain of linked Web pages, typically described using at least their URL and their name, and typically ending with the current page. @@ -34,7 +38,7 @@ public class BreadcrumbList extends ItemList { /** * Builder for {@link BreadcrumbList} */ - public static final class BreadcrumbListThingBuilder implements Builder { + static final class BreadcrumbListThingBuilder implements Builder { /** * Creates new {@link BreadcrumbList} instance. */ @@ -44,14 +48,14 @@ public BreadcrumbList build() { /** * The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list. */ - public Builder numberOfItems(Integer integer) { - this.numberOfItems = integer; + @NotNull public Builder numberOfItems(int numberOfItems) { + this.numberOfItems = numberOfItems; return this; } /** * Type of ordering (e.g. Ascending, Descending, Unordered). */ - public Builder itemListOrder(ItemListOrderType itemListOrderType) { + @NotNull public Builder itemListOrder(ItemListOrderType itemListOrderType) { if (this.itemListOrder == null) this.itemListOrder = new ItemListOrderTypeOrString(); this.itemListOrder.setItemListOrderType(itemListOrderType); return this; @@ -59,13 +63,13 @@ public Builder itemListOrder(ItemListOrderType itemListOrderType) { /** * Type of ordering (e.g. Ascending, Descending, Unordered). */ - public Builder itemListOrder(ItemListOrderType.Builder itemListOrderType) { + @NotNull public Builder itemListOrder(ItemListOrderType.Builder itemListOrderType) { return this.itemListOrder(itemListOrderType.build()); } /** * Type of ordering (e.g. Ascending, Descending, Unordered). */ - public Builder itemListOrder(String itemListOrder) { + @NotNull public Builder itemListOrder(String itemListOrder) { if (this.itemListOrder == null) this.itemListOrder = new ItemListOrderTypeOrString(); this.itemListOrder.setString(itemListOrder); return this; @@ -77,7 +81,7 @@ public Builder itemListOrder(String itemListOrder) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(ListItem listItem) { + @NotNull public Builder itemListElement(ListItem listItem) { if (this.itemListElement == null) this.itemListElement = new ListItemOrStringOrThing(); this.itemListElement.setListItem(listItem); return this; @@ -89,7 +93,7 @@ public Builder itemListElement(ListItem listItem) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(ListItem.Builder listItem) { + @NotNull public Builder itemListElement(ListItem.Builder listItem) { return this.itemListElement(listItem.build()); } /** @@ -99,7 +103,7 @@ public Builder itemListElement(ListItem.Builder listItem) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(String itemListElement) { + @NotNull public Builder itemListElement(String itemListElement) { if (this.itemListElement == null) this.itemListElement = new ListItemOrStringOrThing(); this.itemListElement.setString(itemListElement); return this; @@ -111,7 +115,7 @@ public Builder itemListElement(String itemListElement) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(Thing thing) { + @NotNull public Builder itemListElement(Thing thing) { if (this.itemListElement == null) this.itemListElement = new ListItemOrStringOrThing(); this.itemListElement.setThing(thing); return this; @@ -123,27 +127,27 @@ public Builder itemListElement(Thing thing) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(Thing.Builder thing) { + @NotNull public Builder itemListElement(Thing.Builder thing) { return this.itemListElement(thing.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -177,7 +181,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -212,7 +216,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -245,7 +249,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -253,45 +257,45 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private Integer numberOfItems; + private int numberOfItems; private ItemListOrderTypeOrString itemListOrder; private ListItemOrStringOrThing itemListElement; private String additionalType; @@ -305,30 +309,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder numberOfItems(Integer integer); - Builder itemListOrder(ItemListOrderType itemListOrderType); - Builder itemListOrder(ItemListOrderType.Builder itemListOrderType); - Builder itemListOrder(String itemListOrder); - Builder itemListElement(ListItem listItem); - Builder itemListElement(ListItem.Builder listItem); - Builder itemListElement(String itemListElement); - Builder itemListElement(Thing thing); - Builder itemListElement(Thing.Builder thing); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder numberOfItems(int numberOfItems); + @NotNull Builder itemListOrder(ItemListOrderType itemListOrderType); + @NotNull Builder itemListOrder(ItemListOrderType.Builder itemListOrderType); + @NotNull Builder itemListOrder(String itemListOrder); + @NotNull Builder itemListElement(ListItem listItem); + @NotNull Builder itemListElement(ListItem.Builder listItem); + @NotNull Builder itemListElement(String itemListElement); + @NotNull Builder itemListElement(Thing thing); + @NotNull Builder itemListElement(Thing.Builder thing); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + protected BreadcrumbList(int 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); } } diff --git a/src/main/java/org/schema/BreadcrumbListOrString.java b/src/main/java/org/schema/BreadcrumbListOrString.java index 9b7e7349..c79fd86a 100644 --- a/src/main/java/org/schema/BreadcrumbListOrString.java +++ b/src/main/java/org/schema/BreadcrumbListOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class BreadcrumbListOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myBreadcrumbList != null) return myBreadcrumbList; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setBreadcrumbList(BreadcrumbList breadcrumbList) { clear(); myBreadcrumbList = breadcrumbList; } public BreadcrumbList getBreadcrumbList() { return myBreadcrumbList; } - private BreadcrumbList myBreadcrumbList; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private BreadcrumbList myBreadcrumbList; private String myString; private void clear() { myBreadcrumbList = null; diff --git a/src/main/java/org/schema/Brewery.java b/src/main/java/org/schema/Brewery.java index d47811c8..013fe0f3 100644 --- a/src/main/java/org/schema/Brewery.java +++ b/src/main/java/org/schema/Brewery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Brewery. */ @@ -25,7 +29,7 @@ public class Brewery extends FoodEstablishment { /** * Builder for {@link Brewery} */ - public static final class BreweryThingBuilder implements Builder { + static final class BreweryThingBuilder implements Builder { /** * Creates new {@link Brewery} instance. */ @@ -35,7 +39,7 @@ public Brewery build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -43,7 +47,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -51,121 +55,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -527,60 +531,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BroadcastChannel.java b/src/main/java/org/schema/BroadcastChannel.java index eaca462b..c33d4502 100644 --- a/src/main/java/org/schema/BroadcastChannel.java +++ b/src/main/java/org/schema/BroadcastChannel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A unique instance of a BroadcastService on a CableOrSatelliteService lineup. */ @@ -49,7 +53,7 @@ public BroadcastService getProvidesBroadcastService() { /** * Builder for {@link BroadcastChannel} */ - public static final class BroadcastChannelThingBuilder implements Builder { + static final class BroadcastChannelThingBuilder implements Builder { /** * Creates new {@link BroadcastChannel} instance. */ @@ -59,61 +63,61 @@ public BroadcastChannel build() { /** * The unique address by which the BroadcastService can be identified in a provider lineup. In US, this is typically a number. */ - public Builder broadcastChannelId(String broadcastChannelId) { + @NotNull public Builder broadcastChannelId(String broadcastChannelId) { this.broadcastChannelId = broadcastChannelId; return this; } /** * The CableOrSatelliteService offering the channel. */ - public Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService) { + @NotNull public Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService) { this.inBroadcastLineup = cableOrSatelliteService; return this; } /** * The CableOrSatelliteService offering the channel. */ - public Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService) { + @NotNull public Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService) { return this.inBroadcastLineup(cableOrSatelliteService.build()); } /** * The type of service required to have access to the channel (e.g. Standard or Premium). */ - public Builder broadcastServiceTier(String broadcastServiceTier) { + @NotNull public Builder broadcastServiceTier(String broadcastServiceTier) { this.broadcastServiceTier = broadcastServiceTier; return this; } /** * The BroadcastService offered on this channel. */ - public Builder providesBroadcastService(BroadcastService broadcastService) { + @NotNull public Builder providesBroadcastService(BroadcastService broadcastService) { this.providesBroadcastService = broadcastService; return this; } /** * The BroadcastService offered on this channel. */ - public Builder providesBroadcastService(BroadcastService.Builder broadcastService) { + @NotNull public Builder providesBroadcastService(BroadcastService.Builder broadcastService) { return this.providesBroadcastService(broadcastService.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -147,7 +151,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -182,7 +186,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -215,7 +219,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -223,38 +227,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -276,24 +280,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder broadcastChannelId(String broadcastChannelId); - Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService); - Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService); - Builder broadcastServiceTier(String broadcastServiceTier); - Builder providesBroadcastService(BroadcastService broadcastService); - Builder providesBroadcastService(BroadcastService.Builder broadcastService); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder broadcastChannelId(String broadcastChannelId); + @NotNull Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService); + @NotNull Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService); + @NotNull Builder broadcastServiceTier(String broadcastServiceTier); + @NotNull Builder providesBroadcastService(BroadcastService broadcastService); + @NotNull Builder providesBroadcastService(BroadcastService.Builder broadcastService); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BroadcastChannel(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) { diff --git a/src/main/java/org/schema/BroadcastEvent.java b/src/main/java/org/schema/BroadcastEvent.java index 0fa9282e..61860267 100644 --- a/src/main/java/org/schema/BroadcastEvent.java +++ b/src/main/java/org/schema/BroadcastEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An over the air or online broadcast event. */ @@ -31,7 +35,7 @@ public Boolean getIsLiveBroadcast() { /** * Builder for {@link BroadcastEvent} */ - public static final class BroadcastEventThingBuilder implements Builder { + static final class BroadcastEventThingBuilder implements Builder { /** * Creates new {@link BroadcastEvent} instance. */ @@ -41,47 +45,47 @@ public BroadcastEvent build() { /** * True is the broadcast is of a live event. */ - public Builder isLiveBroadcast(Boolean isLiveBroadcast) { + @NotNull public Builder isLiveBroadcast(Boolean isLiveBroadcast) { this.isLiveBroadcast = isLiveBroadcast; return this; } /** * A flag to signal that the publication is accessible for free. */ - public Builder isAccessibleForFree(Boolean isAccessibleForFree) { + @NotNull public Builder isAccessibleForFree(Boolean isAccessibleForFree) { this.isAccessibleForFree = isAccessibleForFree; return this; } /** * A broadcast service associated with the publication event. */ - public Builder publishedOn(BroadcastService broadcastService) { + @NotNull public Builder publishedOn(BroadcastService broadcastService) { this.publishedOn = broadcastService; return this; } /** * A broadcast service associated with the publication event. */ - public Builder publishedOn(BroadcastService.Builder broadcastService) { + @NotNull public Builder publishedOn(BroadcastService.Builder broadcastService) { return this.publishedOn(broadcastService.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -89,13 +93,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -103,13 +107,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -117,13 +121,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -131,53 +135,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -185,13 +189,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -199,20 +203,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -220,13 +224,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -234,113 +238,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -374,7 +378,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -442,7 +446,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -450,38 +454,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -520,60 +524,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder isLiveBroadcast(Boolean isLiveBroadcast); - Builder isAccessibleForFree(Boolean isAccessibleForFree); - Builder publishedOn(BroadcastService broadcastService); - Builder publishedOn(BroadcastService.Builder broadcastService); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder isLiveBroadcast(Boolean isLiveBroadcast); + @NotNull Builder isAccessibleForFree(Boolean isAccessibleForFree); + @NotNull Builder publishedOn(BroadcastService broadcastService); + @NotNull Builder publishedOn(BroadcastService.Builder broadcastService); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BroadcastEvent(Boolean isLiveBroadcast, 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) { diff --git a/src/main/java/org/schema/BroadcastRelease.java b/src/main/java/org/schema/BroadcastRelease.java index fadec729..6f5a37b0 100644 --- a/src/main/java/org/schema/BroadcastRelease.java +++ b/src/main/java/org/schema/BroadcastRelease.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * BroadcastRelease. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class BroadcastRelease { /** * Builder for {@link BroadcastRelease} */ - public static final class BroadcastReleaseThingBuilder implements Builder { + static final class BroadcastReleaseThingBuilder implements Builder { /** * Creates new {@link BroadcastRelease} instance. */ @@ -35,7 +39,7 @@ public BroadcastRelease build() { } } public interface Builder extends ThingBuilder { - + } protected BroadcastRelease() { diff --git a/src/main/java/org/schema/BroadcastService.java b/src/main/java/org/schema/BroadcastService.java index 42908f6a..1d78dda4 100644 --- a/src/main/java/org/schema/BroadcastService.java +++ b/src/main/java/org/schema/BroadcastService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A delivery service through which content is provided via broadcast over the air or online. */ @@ -55,7 +59,7 @@ public String getTimezone() { /** * Builder for {@link BroadcastService} */ - public static final class BroadcastServiceThingBuilder implements Builder { + static final class BroadcastServiceThingBuilder implements Builder { /** * Creates new {@link BroadcastService} instance. */ @@ -65,74 +69,74 @@ public BroadcastService build() { /** * The organization owning or operating the broadcast service. */ - public Builder broadcaster(Organization organization) { + @NotNull public Builder broadcaster(Organization organization) { this.broadcaster = organization; return this; } /** * The organization owning or operating the broadcast service. */ - public Builder broadcaster(Organization.Builder organization) { + @NotNull public Builder broadcaster(Organization.Builder organization) { return this.broadcaster(organization.build()); } /** * A broadcast service to which the broadcast service may belong to such as regional variations of a national channel. */ - public Builder parentService(BroadcastService broadcastService) { + @NotNull public Builder parentService(BroadcastService broadcastService) { this.parentService = broadcastService; return this; } /** * A broadcast service to which the broadcast service may belong to such as regional variations of a national channel. */ - public Builder parentService(BroadcastService.Builder broadcastService) { + @NotNull public Builder parentService(BroadcastService.Builder broadcastService) { return this.parentService(broadcastService.build()); } /** * The media network(s) whose content is broadcast on this station. */ - public Builder broadcastAffiliateOf(Organization organization) { + @NotNull public Builder broadcastAffiliateOf(Organization organization) { this.broadcastAffiliateOf = organization; return this; } /** * The media network(s) whose content is broadcast on this station. */ - public Builder broadcastAffiliateOf(Organization.Builder organization) { + @NotNull public Builder broadcastAffiliateOf(Organization.Builder organization) { return this.broadcastAffiliateOf(organization.build()); } /** * The name displayed in the channel guide. For many US affiliates, it is the network name. */ - public Builder broadcastDisplayName(String broadcastDisplayName) { + @NotNull public Builder broadcastDisplayName(String broadcastDisplayName) { this.broadcastDisplayName = broadcastDisplayName; return this; } /** * The timezone in ISO 8601 format for which the service bases its broadcasts. */ - public Builder timezone(String timezone) { + @NotNull public Builder timezone(String timezone) { this.timezone = timezone; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -166,7 +170,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -201,7 +205,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -234,7 +238,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -242,38 +246,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -296,26 +300,26 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder broadcaster(Organization organization); - Builder broadcaster(Organization.Builder organization); - Builder parentService(BroadcastService broadcastService); - Builder parentService(BroadcastService.Builder broadcastService); - Builder broadcastAffiliateOf(Organization organization); - Builder broadcastAffiliateOf(Organization.Builder organization); - Builder broadcastDisplayName(String broadcastDisplayName); - Builder timezone(String timezone); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder broadcaster(Organization organization); + @NotNull Builder broadcaster(Organization.Builder organization); + @NotNull Builder parentService(BroadcastService broadcastService); + @NotNull Builder parentService(BroadcastService.Builder broadcastService); + @NotNull Builder broadcastAffiliateOf(Organization organization); + @NotNull Builder broadcastAffiliateOf(Organization.Builder organization); + @NotNull Builder broadcastDisplayName(String broadcastDisplayName); + @NotNull Builder timezone(String timezone); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BroadcastService(Organization broadcaster, BroadcastService parentService, Organization broadcastAffiliateOf, String broadcastDisplayName, String timezone, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/BuddhistTemple.java b/src/main/java/org/schema/BuddhistTemple.java index d041a256..2261ef3f 100644 --- a/src/main/java/org/schema/BuddhistTemple.java +++ b/src/main/java/org/schema/BuddhistTemple.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A Buddhist temple. */ @@ -25,7 +29,7 @@ public class BuddhistTemple extends PlaceOfWorship { /** * Builder for {@link BuddhistTemple} */ - public static final class BuddhistTempleThingBuilder implements Builder { + static final class BuddhistTempleThingBuilder implements Builder { /** * Creates new {@link BuddhistTemple} instance. */ @@ -35,73 +39,73 @@ public BuddhistTemple build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BusReservation.java b/src/main/java/org/schema/BusReservation.java index cc707427..a5c9b1f9 100644 --- a/src/main/java/org/schema/BusReservation.java +++ b/src/main/java/org/schema/BusReservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservation for bus travel.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use http://schema.org/Offer. */ @@ -25,7 +29,7 @@ public class BusReservation extends Reservation { /** * Builder for {@link BusReservation} */ - public static final class BusReservationThingBuilder implements Builder { + static final class BusReservationThingBuilder implements Builder { /** * Creates new {@link BusReservation} instance. */ @@ -35,40 +39,40 @@ public BusReservation build() { /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -76,13 +80,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -90,13 +94,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -104,13 +108,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -118,53 +122,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -172,7 +176,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -180,13 +184,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -194,14 +198,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -209,13 +213,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -223,27 +227,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -277,7 +281,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -312,7 +316,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -345,7 +349,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -353,38 +357,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -414,46 +418,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/BusStation.java b/src/main/java/org/schema/BusStation.java index d6e1c422..617ba1d7 100644 --- a/src/main/java/org/schema/BusStation.java +++ b/src/main/java/org/schema/BusStation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A bus station. */ @@ -25,7 +29,7 @@ public class BusStation extends CivicStructure { /** * Builder for {@link BusStation} */ - public static final class BusStationThingBuilder implements Builder { + static final class BusStationThingBuilder implements Builder { /** * Creates new {@link BusStation} instance. */ @@ -35,73 +39,73 @@ public BusStation build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BusStationOrBusStop.java b/src/main/java/org/schema/BusStationOrBusStop.java index c36b5658..f3014e7c 100644 --- a/src/main/java/org/schema/BusStationOrBusStop.java +++ b/src/main/java/org/schema/BusStationOrBusStop.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class BusStationOrBusStop { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myBusStation != null) return myBusStation; if (myBusStop != null) return myBusStop; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setBusStation(BusStation busStation) { clear(); myBusStation = busStation; } public BusStation getBusStation() { return myBusStation; } - private BusStation myBusStation; public void setBusStop(BusStop busStop) { clear(); myBusStop = busStop; } public BusStop getBusStop() { return myBusStop; } + private BusStation myBusStation; private BusStop myBusStop; private void clear() { myBusStation = null; diff --git a/src/main/java/org/schema/BusStop.java b/src/main/java/org/schema/BusStop.java index 27c587ee..6b1408aa 100644 --- a/src/main/java/org/schema/BusStop.java +++ b/src/main/java/org/schema/BusStop.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A bus stop. */ @@ -25,7 +29,7 @@ public class BusStop extends CivicStructure { /** * Builder for {@link BusStop} */ - public static final class BusStopThingBuilder implements Builder { + static final class BusStopThingBuilder implements Builder { /** * Creates new {@link BusStop} instance. */ @@ -35,73 +39,73 @@ public BusStop build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BusTrip.java b/src/main/java/org/schema/BusTrip.java index e4058d2e..7b042593 100644 --- a/src/main/java/org/schema/BusTrip.java +++ b/src/main/java/org/schema/BusTrip.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A trip on a commercial bus line. */ @@ -31,14 +35,14 @@ public OrganizationOrPerson getProvider() { /** * The expected departure time. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDepartureTime() { return myDepartureTime; } /** * The expected arrival time. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getArrivalTime() { return myArrivalTime; } @@ -69,7 +73,7 @@ public BusStationOrBusStop getArrivalBusStop() { /** * Builder for {@link BusTrip} */ - public static final class BusTripThingBuilder implements Builder { + static final class BusTripThingBuilder implements Builder { /** * Creates new {@link BusTrip} instance. */ @@ -79,7 +83,7 @@ public BusTrip build() { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -87,13 +91,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -101,41 +105,41 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The expected departure time. */ - public Builder departureTime(java.util.Date date) { + @NotNull public Builder departureTime(java.util.Date date) { this.departureTime = date; return this; } /** * The expected arrival time. */ - public Builder arrivalTime(java.util.Date date) { + @NotNull public Builder arrivalTime(java.util.Date date) { this.arrivalTime = date; return this; } /** * The unique identifier for the bus. */ - public Builder busNumber(String busNumber) { + @NotNull public Builder busNumber(String busNumber) { this.busNumber = busNumber; return this; } /** * The name of the bus (e.g. Bolt Express). */ - public Builder busName(String busName) { + @NotNull public Builder busName(String busName) { this.busName = busName; return this; } /** * The stop or station from which the bus departs. */ - public Builder departureBusStop(BusStation busStation) { + @NotNull public Builder departureBusStop(BusStation busStation) { if (this.departureBusStop == null) this.departureBusStop = new BusStationOrBusStop(); this.departureBusStop.setBusStation(busStation); return this; @@ -143,13 +147,13 @@ public Builder departureBusStop(BusStation busStation) { /** * The stop or station from which the bus departs. */ - public Builder departureBusStop(BusStation.Builder busStation) { + @NotNull public Builder departureBusStop(BusStation.Builder busStation) { return this.departureBusStop(busStation.build()); } /** * The stop or station from which the bus departs. */ - public Builder departureBusStop(BusStop busStop) { + @NotNull public Builder departureBusStop(BusStop busStop) { if (this.departureBusStop == null) this.departureBusStop = new BusStationOrBusStop(); this.departureBusStop.setBusStop(busStop); return this; @@ -157,13 +161,13 @@ public Builder departureBusStop(BusStop busStop) { /** * The stop or station from which the bus departs. */ - public Builder departureBusStop(BusStop.Builder busStop) { + @NotNull public Builder departureBusStop(BusStop.Builder busStop) { return this.departureBusStop(busStop.build()); } /** * The stop or station from which the bus arrives. */ - public Builder arrivalBusStop(BusStation busStation) { + @NotNull public Builder arrivalBusStop(BusStation busStation) { if (this.arrivalBusStop == null) this.arrivalBusStop = new BusStationOrBusStop(); this.arrivalBusStop.setBusStation(busStation); return this; @@ -171,13 +175,13 @@ public Builder arrivalBusStop(BusStation busStation) { /** * The stop or station from which the bus arrives. */ - public Builder arrivalBusStop(BusStation.Builder busStation) { + @NotNull public Builder arrivalBusStop(BusStation.Builder busStation) { return this.arrivalBusStop(busStation.build()); } /** * The stop or station from which the bus arrives. */ - public Builder arrivalBusStop(BusStop busStop) { + @NotNull public Builder arrivalBusStop(BusStop busStop) { if (this.arrivalBusStop == null) this.arrivalBusStop = new BusStationOrBusStop(); this.arrivalBusStop.setBusStop(busStop); return this; @@ -185,27 +189,27 @@ public Builder arrivalBusStop(BusStop busStop) { /** * The stop or station from which the bus arrives. */ - public Builder arrivalBusStop(BusStop.Builder busStop) { + @NotNull public Builder arrivalBusStop(BusStop.Builder busStop) { return this.arrivalBusStop(busStop.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -239,7 +243,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -274,7 +278,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -307,7 +311,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -315,38 +319,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -371,34 +375,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder departureTime(java.util.Date date); - Builder arrivalTime(java.util.Date date); - Builder busNumber(String busNumber); - Builder busName(String busName); - Builder departureBusStop(BusStation busStation); - Builder departureBusStop(BusStation.Builder busStation); - Builder departureBusStop(BusStop busStop); - Builder departureBusStop(BusStop.Builder busStop); - Builder arrivalBusStop(BusStation busStation); - Builder arrivalBusStop(BusStation.Builder busStation); - Builder arrivalBusStop(BusStop busStop); - Builder arrivalBusStop(BusStop.Builder busStop); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder departureTime(java.util.Date date); + @NotNull Builder arrivalTime(java.util.Date date); + @NotNull Builder busNumber(String busNumber); + @NotNull Builder busName(String busName); + @NotNull Builder departureBusStop(BusStation busStation); + @NotNull Builder departureBusStop(BusStation.Builder busStation); + @NotNull Builder departureBusStop(BusStop busStop); + @NotNull Builder departureBusStop(BusStop.Builder busStop); + @NotNull Builder arrivalBusStop(BusStation busStation); + @NotNull Builder arrivalBusStop(BusStation.Builder busStation); + @NotNull Builder arrivalBusStop(BusStop busStop); + @NotNull Builder arrivalBusStop(BusStop.Builder busStop); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BusTrip(OrganizationOrPerson provider, java.util.Date departureTime, java.util.Date arrivalTime, String busNumber, String busName, BusStationOrBusStop departureBusStop, BusStationOrBusStop arrivalBusStop, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/BusinessAudience.java b/src/main/java/org/schema/BusinessAudience.java index 418bb270..c150d390 100644 --- a/src/main/java/org/schema/BusinessAudience.java +++ b/src/main/java/org/schema/BusinessAudience.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A set of characteristics belonging to businesses, e.g. who compose an item's target audience. */ @@ -43,7 +47,7 @@ public QuantitativeValue getYearsInOperation() { /** * Builder for {@link BusinessAudience} */ - public static final class BusinessAudienceThingBuilder implements Builder { + static final class BusinessAudienceThingBuilder implements Builder { /** * Creates new {@link BusinessAudience} instance. */ @@ -53,80 +57,80 @@ public BusinessAudience build() { /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * The size of the business in annual revenue. */ - public Builder yearlyRevenue(QuantitativeValue quantitativeValue) { + @NotNull public Builder yearlyRevenue(QuantitativeValue quantitativeValue) { this.yearlyRevenue = quantitativeValue; return this; } /** * The size of the business in annual revenue. */ - public Builder yearlyRevenue(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder yearlyRevenue(QuantitativeValue.Builder quantitativeValue) { return this.yearlyRevenue(quantitativeValue.build()); } /** * The age of the business. */ - public Builder yearsInOperation(QuantitativeValue quantitativeValue) { + @NotNull public Builder yearsInOperation(QuantitativeValue quantitativeValue) { this.yearsInOperation = quantitativeValue; return this; } /** * The age of the business. */ - public Builder yearsInOperation(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder yearsInOperation(QuantitativeValue.Builder quantitativeValue) { return this.yearsInOperation(quantitativeValue.build()); } /** * The target group associated with a given audience (e.g. veterans, car owners, musicians, etc.). */ - public Builder audienceType(String audienceType) { + @NotNull public Builder audienceType(String audienceType) { this.audienceType = audienceType; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea administrativeArea) { this.geographicArea = administrativeArea; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { return this.geographicArea(administrativeArea.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -160,7 +164,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -195,7 +199,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -228,7 +232,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -236,38 +240,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -290,27 +294,27 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder yearlyRevenue(QuantitativeValue quantitativeValue); - Builder yearlyRevenue(QuantitativeValue.Builder quantitativeValue); - Builder yearsInOperation(QuantitativeValue quantitativeValue); - Builder yearsInOperation(QuantitativeValue.Builder quantitativeValue); - Builder audienceType(String audienceType); - Builder geographicArea(AdministrativeArea administrativeArea); - Builder geographicArea(AdministrativeArea.Builder administrativeArea); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder yearlyRevenue(QuantitativeValue quantitativeValue); + @NotNull Builder yearlyRevenue(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder yearsInOperation(QuantitativeValue quantitativeValue); + @NotNull Builder yearsInOperation(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder audienceType(String audienceType); + @NotNull Builder geographicArea(AdministrativeArea administrativeArea); + @NotNull Builder geographicArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BusinessAudience(QuantitativeValue numberOfEmployees, QuantitativeValue yearlyRevenue, QuantitativeValue yearsInOperation, String audienceType, AdministrativeArea geographicArea, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/BusinessEntityType.java b/src/main/java/org/schema/BusinessEntityType.java index 3bcc89b1..a92ca78e 100644 --- a/src/main/java/org/schema/BusinessEntityType.java +++ b/src/main/java/org/schema/BusinessEntityType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A business entity type is a conceptual entity representing the legal form, the size, the main line of business, the position in the value chain, or any combination thereof, of an organization or business person. *
@@ -35,7 +39,7 @@ public class BusinessEntityType extends Enumeration { /** * Builder for {@link BusinessEntityType} */ - public static final class BusinessEntityTypeThingBuilder implements Builder { + static final class BusinessEntityTypeThingBuilder implements Builder { /** * Creates new {@link BusinessEntityType} instance. */ @@ -45,7 +49,7 @@ public BusinessEntityType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -53,13 +57,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -67,27 +71,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -121,7 +125,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -156,7 +160,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -189,7 +193,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -197,38 +201,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -247,22 +251,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BusinessEntityType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/BusinessEvent.java b/src/main/java/org/schema/BusinessEvent.java index d19015df..59f8e741 100644 --- a/src/main/java/org/schema/BusinessEvent.java +++ b/src/main/java/org/schema/BusinessEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Business event. */ @@ -25,7 +29,7 @@ public class BusinessEvent extends Event { /** * Builder for {@link BusinessEvent} */ - public static final class BusinessEventThingBuilder implements Builder { + static final class BusinessEventThingBuilder implements Builder { /** * Creates new {@link BusinessEvent} instance. */ @@ -35,20 +39,20 @@ public BusinessEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/BusinessFunction.java b/src/main/java/org/schema/BusinessFunction.java index 84197831..d60e802c 100644 --- a/src/main/java/org/schema/BusinessFunction.java +++ b/src/main/java/org/schema/BusinessFunction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The business function specifies the type of activity or access (i.e., the bundle of rights) offered by the organization or business person through the offer. Typical are sell, rental or lease, maintenance or repair, manufacture / produce, recycle / dispose, engineering / construction, or installation. Proprietary specifications of access rights are also instances of this class. *
@@ -38,7 +42,7 @@ public class BusinessFunction extends Enumeration { /** * Builder for {@link BusinessFunction} */ - public static final class BusinessFunctionThingBuilder implements Builder { + static final class BusinessFunctionThingBuilder implements Builder { /** * Creates new {@link BusinessFunction} instance. */ @@ -48,7 +52,7 @@ public BusinessFunction build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -56,13 +60,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -70,27 +74,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -124,7 +128,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -159,7 +163,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -192,7 +196,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -200,38 +204,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -250,22 +254,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected BusinessFunction(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/BuyAction.java b/src/main/java/org/schema/BuyAction.java index a508c12e..811765b7 100644 --- a/src/main/java/org/schema/BuyAction.java +++ b/src/main/java/org/schema/BuyAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of giving money to a seller in exchange for goods or services rendered. An agent buys an object, product, or service from a seller for a price. Reciprocal of SellAction. */ @@ -31,7 +35,7 @@ public Participant getSeller() { /** * Builder for {@link BuyAction} */ - public static final class BuyActionThingBuilder implements Builder { + static final class BuyActionThingBuilder implements Builder { /** * Creates new {@link BuyAction} instance. */ @@ -41,7 +45,7 @@ public BuyAction build() { /** * An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider. */ - public Builder seller(Participant participant) { + @NotNull public Builder seller(Participant participant) { this.seller = participant; return this; } @@ -68,7 +72,7 @@ public Builder seller(Participant participant) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -96,7 +100,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -104,20 +108,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -125,13 +129,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -139,7 +143,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -147,7 +151,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -156,67 +160,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -250,7 +254,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -285,7 +289,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -318,7 +322,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -326,38 +330,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -384,35 +388,35 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder seller(Participant participant); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder seller(Participant participant); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/CDFormat.java b/src/main/java/org/schema/CDFormat.java index cb5577d0..36458b60 100644 --- a/src/main/java/org/schema/CDFormat.java +++ b/src/main/java/org/schema/CDFormat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * CDFormat. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class CDFormat { /** * Builder for {@link CDFormat} */ - public static final class CDFormatThingBuilder implements Builder { + static final class CDFormatThingBuilder implements Builder { /** * Creates new {@link CDFormat} instance. */ @@ -35,7 +39,7 @@ public CDFormat build() { } } public interface Builder extends ThingBuilder { - + } protected CDFormat() { diff --git a/src/main/java/org/schema/CT.java b/src/main/java/org/schema/CT.java index 55bd9f3c..9c026e4a 100644 --- a/src/main/java/org/schema/CT.java +++ b/src/main/java/org/schema/CT.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * X-ray computed tomography imaging. */ @@ -25,7 +29,7 @@ public class CT { /** * Builder for {@link CT} */ - public static final class CTThingBuilder implements Builder { + static final class CTThingBuilder implements Builder { /** * Creates new {@link CT} instance. */ @@ -34,7 +38,7 @@ public CT build() { } } public interface Builder extends ThingBuilder { - + } protected CT() { diff --git a/src/main/java/org/schema/CableOrSatelliteService.java b/src/main/java/org/schema/CableOrSatelliteService.java index 6c908aae..027a0df7 100644 --- a/src/main/java/org/schema/CableOrSatelliteService.java +++ b/src/main/java/org/schema/CableOrSatelliteService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A service which provides access to media programming like TV or radio. Access may be via cable or satellite. */ @@ -25,7 +29,7 @@ public class CableOrSatelliteService extends Service { /** * Builder for {@link CableOrSatelliteService} */ - public static final class CableOrSatelliteServiceThingBuilder implements Builder { + static final class CableOrSatelliteServiceThingBuilder implements Builder { /** * Creates new {@link CableOrSatelliteService} instance. */ @@ -35,79 +39,79 @@ public CableOrSatelliteService build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel serviceChannel) { this.availableChannel = serviceChannel; return this; } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel.Builder serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel.Builder serviceChannel) { return this.availableChannel(serviceChannel.build()); } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing thing) { + @NotNull public Builder serviceOutput(Thing thing) { this.serviceOutput = thing; return this; } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing.Builder thing) { + @NotNull public Builder serviceOutput(Thing.Builder thing) { return this.serviceOutput(thing.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea administrativeArea) { this.serviceArea = administrativeArea; return this; } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { return this.serviceArea(administrativeArea.build()); } /** * The type of service being offered, e.g. veterans' benefits, emergency relief, etc. */ - public Builder serviceType(String serviceType) { + @NotNull public Builder serviceType(String serviceType) { this.serviceType = serviceType; return this; } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -115,13 +119,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -129,27 +133,27 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -183,7 +187,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -218,7 +222,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -251,7 +255,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -259,38 +263,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -315,33 +319,33 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder availableChannel(ServiceChannel serviceChannel); - Builder availableChannel(ServiceChannel.Builder serviceChannel); - Builder serviceOutput(Thing thing); - Builder serviceOutput(Thing.Builder thing); - Builder review(Review review); - Builder review(Review.Builder review); - Builder serviceArea(AdministrativeArea administrativeArea); - Builder serviceArea(AdministrativeArea.Builder administrativeArea); - Builder serviceType(String serviceType); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder availableChannel(ServiceChannel serviceChannel); + @NotNull Builder availableChannel(ServiceChannel.Builder serviceChannel); + @NotNull Builder serviceOutput(Thing thing); + @NotNull Builder serviceOutput(Thing.Builder thing); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder serviceArea(AdministrativeArea administrativeArea); + @NotNull Builder serviceArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder serviceType(String serviceType); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CafeOrCoffeeShop.java b/src/main/java/org/schema/CafeOrCoffeeShop.java index 1e646497..bafd0378 100644 --- a/src/main/java/org/schema/CafeOrCoffeeShop.java +++ b/src/main/java/org/schema/CafeOrCoffeeShop.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A cafe or coffee shop. */ @@ -25,7 +29,7 @@ public class CafeOrCoffeeShop extends FoodEstablishment { /** * Builder for {@link CafeOrCoffeeShop} */ - public static final class CafeOrCoffeeShopThingBuilder implements Builder { + static final class CafeOrCoffeeShopThingBuilder implements Builder { /** * Creates new {@link CafeOrCoffeeShop} instance. */ @@ -35,7 +39,7 @@ public CafeOrCoffeeShop build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -43,7 +47,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -51,121 +55,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -527,60 +531,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Campground.java b/src/main/java/org/schema/Campground.java index 1278f416..12f8c6a7 100644 --- a/src/main/java/org/schema/Campground.java +++ b/src/main/java/org/schema/Campground.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A campground. */ @@ -25,7 +29,7 @@ public class Campground extends CivicStructure { /** * Builder for {@link Campground} */ - public static final class CampgroundThingBuilder implements Builder { + static final class CampgroundThingBuilder implements Builder { /** * Creates new {@link Campground} instance. */ @@ -35,73 +39,73 @@ public Campground build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Canal.java b/src/main/java/org/schema/Canal.java index 80e95528..bfee409b 100644 --- a/src/main/java/org/schema/Canal.java +++ b/src/main/java/org/schema/Canal.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A canal, like the Panama Canal. */ @@ -25,7 +29,7 @@ public class Canal extends BodyOfWater { /** * Builder for {@link Canal} */ - public static final class CanalThingBuilder implements Builder { + static final class CanalThingBuilder implements Builder { /** * Creates new {@link Canal} instance. */ @@ -35,66 +39,66 @@ public Canal build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CancelAction.java b/src/main/java/org/schema/CancelAction.java index e91b27ba..af8aae54 100644 --- a/src/main/java/org/schema/CancelAction.java +++ b/src/main/java/org/schema/CancelAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of asserting that a future event/action is no longer going to happen.

Related actions:

. */ @@ -25,7 +29,7 @@ public class CancelAction extends PlanAction { /** * Builder for {@link CancelAction} */ - public static final class CancelActionThingBuilder implements Builder { + static final class CancelActionThingBuilder implements Builder { /** * Creates new {@link CancelAction} instance. */ @@ -35,14 +39,14 @@ public CancelAction build() { /** * The time the object is scheduled to. */ - public Builder scheduledTime(java.util.Date date) { + @NotNull public Builder scheduledTime(java.util.Date date) { this.scheduledTime = date; return this; } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -50,13 +54,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -64,7 +68,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -72,7 +76,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -81,67 +85,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -175,7 +179,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -210,7 +214,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -243,7 +247,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -251,38 +255,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -307,31 +311,31 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder scheduledTime(java.util.Date date); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder scheduledTime(java.util.Date date); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Car.java b/src/main/java/org/schema/Car.java index ddef748d..82e19c53 100644 --- a/src/main/java/org/schema/Car.java +++ b/src/main/java/org/schema/Car.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A car is a wheeled, self-powered motor vehicle used for transportation. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class Car extends Vehicle { /** * Builder for {@link Car} */ - public static final class CarThingBuilder implements Builder { + static final class CarThingBuilder implements Builder { /** * Creates new {@link Car} instance. */ @@ -37,7 +41,7 @@ public Car build() { * The number of doors.
Typical unit code(s): C62 */ - public Builder numberOfDoors(Number number) { + @NotNull public Builder numberOfDoors(Number number) { if (this.numberOfDoors == null) this.numberOfDoors = new NumberOrQuantitativeValue(); this.numberOfDoors.setNumber(number); return this; @@ -46,7 +50,7 @@ public Builder numberOfDoors(Number number) { * The number of doors.
Typical unit code(s): C62 */ - public Builder numberOfDoors(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfDoors(QuantitativeValue quantitativeValue) { if (this.numberOfDoors == null) this.numberOfDoors = new NumberOrQuantitativeValue(); this.numberOfDoors.setQuantitativeValue(quantitativeValue); return this; @@ -55,13 +59,13 @@ public Builder numberOfDoors(QuantitativeValue quantitativeValue) { * The number of doors.
Typical unit code(s): C62 */ - public Builder numberOfDoors(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfDoors(QuantitativeValue.Builder quantitativeValue) { return this.numberOfDoors(quantitativeValue.build()); } /** * The number or type of airbags in the vehicle. */ - public Builder numberOfAirbags(Number number) { + @NotNull public Builder numberOfAirbags(Number number) { if (this.numberOfAirbags == null) this.numberOfAirbags = new NumberOrString(); this.numberOfAirbags.setNumber(number); return this; @@ -69,7 +73,7 @@ public Builder numberOfAirbags(Number number) { /** * The number or type of airbags in the vehicle. */ - public Builder numberOfAirbags(String numberOfAirbags) { + @NotNull public Builder numberOfAirbags(String numberOfAirbags) { if (this.numberOfAirbags == null) this.numberOfAirbags = new NumberOrString(); this.numberOfAirbags.setString(numberOfAirbags); return this; @@ -78,7 +82,7 @@ public Builder numberOfAirbags(String numberOfAirbags) { * The number of axles.
Typical unit code(s): C62 */ - public Builder numberOfAxles(Number number) { + @NotNull public Builder numberOfAxles(Number number) { if (this.numberOfAxles == null) this.numberOfAxles = new NumberOrQuantitativeValue(); this.numberOfAxles.setNumber(number); return this; @@ -87,7 +91,7 @@ public Builder numberOfAxles(Number number) { * The number of axles.
Typical unit code(s): C62 */ - public Builder numberOfAxles(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfAxles(QuantitativeValue quantitativeValue) { if (this.numberOfAxles == null) this.numberOfAxles = new NumberOrQuantitativeValue(); this.numberOfAxles.setQuantitativeValue(quantitativeValue); return this; @@ -96,20 +100,20 @@ public Builder numberOfAxles(QuantitativeValue quantitativeValue) { * The number of axles.
Typical unit code(s): C62 */ - public Builder numberOfAxles(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfAxles(QuantitativeValue.Builder quantitativeValue) { return this.numberOfAxles(quantitativeValue.build()); } /** * Information about the engine or engines of the vehicle. */ - public Builder vehicleEngine(EngineSpecification engineSpecification) { + @NotNull public Builder vehicleEngine(EngineSpecification engineSpecification) { this.vehicleEngine = engineSpecification; return this; } /** * Information about the engine or engines of the vehicle. */ - public Builder vehicleEngine(EngineSpecification.Builder engineSpecification) { + @NotNull public Builder vehicleEngine(EngineSpecification.Builder engineSpecification) { return this.vehicleEngine(engineSpecification.build()); } /** @@ -119,7 +123,7 @@ public Builder vehicleEngine(EngineSpecification.Builder engineSpecification) { Note 2: There are two ways of indicating the fuel consumption, fuelConsumption (e.g. 8 liters per 100 km) and fuelEfficiency (e.g. 30 miles per gallon). They are reciprocal.
Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use valueReference to link the value for the fuel consumption to another value. */ - public Builder fuelConsumption(QuantitativeValue quantitativeValue) { + @NotNull public Builder fuelConsumption(QuantitativeValue quantitativeValue) { this.fuelConsumption = quantitativeValue; return this; } @@ -130,7 +134,7 @@ public Builder fuelConsumption(QuantitativeValue quantitativeValue) { Note 2: There are two ways of indicating the fuel consumption, fuelConsumption (e.g. 8 liters per 100 km) and fuelEfficiency (e.g. 30 miles per gallon). They are reciprocal.
Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use valueReference to link the value for the fuel consumption to another value. */ - public Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue) { return this.fuelConsumption(quantitativeValue.build()); } /** @@ -140,7 +144,7 @@ public Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue) { Note 2: There are two ways of indicating the fuel consumption, fuelConsumption (e.g. 8 liters per 100 km) and fuelEfficiency (e.g. 30 miles per gallon). They are reciprocal.
Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use valueReference to link the value for the fuel economy to another value. */ - public Builder fuelEfficiency(QuantitativeValue quantitativeValue) { + @NotNull public Builder fuelEfficiency(QuantitativeValue quantitativeValue) { this.fuelEfficiency = quantitativeValue; return this; } @@ -151,14 +155,14 @@ public Builder fuelEfficiency(QuantitativeValue quantitativeValue) { Note 2: There are two ways of indicating the fuel consumption, fuelConsumption (e.g. 8 liters per 100 km) and fuelEfficiency (e.g. 30 miles per gallon). They are reciprocal.
Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use valueReference to link the value for the fuel economy to another value. */ - public Builder fuelEfficiency(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder fuelEfficiency(QuantitativeValue.Builder quantitativeValue) { return this.fuelEfficiency(quantitativeValue.build()); } /** * The total number of forward gears available for the transmission system of the vehicle.
Typical unit code(s): C62 */ - public Builder numberOfForwardGears(Number number) { + @NotNull public Builder numberOfForwardGears(Number number) { if (this.numberOfForwardGears == null) this.numberOfForwardGears = new NumberOrQuantitativeValue(); this.numberOfForwardGears.setNumber(number); return this; @@ -167,7 +171,7 @@ public Builder numberOfForwardGears(Number number) { * The total number of forward gears available for the transmission system of the vehicle.
Typical unit code(s): C62 */ - public Builder numberOfForwardGears(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfForwardGears(QuantitativeValue quantitativeValue) { if (this.numberOfForwardGears == null) this.numberOfForwardGears = new NumberOrQuantitativeValue(); this.numberOfForwardGears.setQuantitativeValue(quantitativeValue); return this; @@ -176,13 +180,13 @@ public Builder numberOfForwardGears(QuantitativeValue quantitativeValue) { * The total number of forward gears available for the transmission system of the vehicle.
Typical unit code(s): C62 */ - public Builder numberOfForwardGears(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfForwardGears(QuantitativeValue.Builder quantitativeValue) { return this.numberOfForwardGears(quantitativeValue.build()); } /** * The Vehicle Identification Number (VIN) is a unique serial number used by the automotive industry to identify individual motor vehicles. */ - public Builder vin(String vin) { + @NotNull public Builder vin(String vin) { this.vin = vin; return this; } @@ -192,7 +196,7 @@ Typical unit code(s): LTR for liters, FTQ for cubic foot/feet
Note: You can use minValue and maxValue to indicate ranges. */ - public Builder cargoVolume(QuantitativeValue quantitativeValue) { + @NotNull public Builder cargoVolume(QuantitativeValue quantitativeValue) { this.cargoVolume = quantitativeValue; return this; } @@ -202,34 +206,34 @@ Typical unit code(s): LTR for liters, FTQ for cubic foot/feet
Note: You can use minValue and maxValue to indicate ranges. */ - public Builder cargoVolume(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder cargoVolume(QuantitativeValue.Builder quantitativeValue) { return this.cargoVolume(quantitativeValue.build()); } /** * A short text indicating the configuration of the vehicle, e.g. '5dr hatchback ST 2.5 MT 225 hp' or 'limited edition'. */ - public Builder vehicleConfiguration(String vehicleConfiguration) { + @NotNull public Builder vehicleConfiguration(String vehicleConfiguration) { this.vehicleConfiguration = vehicleConfiguration; return this; } /** * A textual description of known damages, both repaired and unrepaired. */ - public Builder knownVehicleDamages(String knownVehicleDamages) { + @NotNull public Builder knownVehicleDamages(String knownVehicleDamages) { this.knownVehicleDamages = knownVehicleDamages; return this; } /** * The date of the first registration of the vehicle with the respective public authorities. */ - public Builder dateVehicleFirstRegistered(java.util.Date date) { + @NotNull public Builder dateVehicleFirstRegistered(java.util.Date date) { this.dateVehicleFirstRegistered = date; return this; } /** * The drive wheel configuration, i.e. which roadwheels will receive torque from the vehicle's engine via the drivetrain. */ - public Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelConfigurationValue) { + @NotNull public Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelConfigurationValue) { if (this.driveWheelConfiguration == null) this.driveWheelConfiguration = new DriveWheelConfigurationValueOrString(); this.driveWheelConfiguration.setDriveWheelConfigurationValue(driveWheelConfigurationValue); return this; @@ -237,13 +241,13 @@ public Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelCo /** * The drive wheel configuration, i.e. which roadwheels will receive torque from the vehicle's engine via the drivetrain. */ - public Builder driveWheelConfiguration(DriveWheelConfigurationValue.Builder driveWheelConfigurationValue) { + @NotNull public Builder driveWheelConfiguration(DriveWheelConfigurationValue.Builder driveWheelConfigurationValue) { return this.driveWheelConfiguration(driveWheelConfigurationValue.build()); } /** * The drive wheel configuration, i.e. which roadwheels will receive torque from the vehicle's engine via the drivetrain. */ - public Builder driveWheelConfiguration(String driveWheelConfiguration) { + @NotNull public Builder driveWheelConfiguration(String driveWheelConfiguration) { if (this.driveWheelConfiguration == null) this.driveWheelConfiguration = new DriveWheelConfigurationValueOrString(); this.driveWheelConfiguration.setString(driveWheelConfiguration); return this; @@ -251,7 +255,7 @@ public Builder driveWheelConfiguration(String driveWheelConfiguration) { /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(QualitativeValue qualitativeValue) { + @NotNull public Builder fuelType(QualitativeValue qualitativeValue) { if (this.fuelType == null) this.fuelType = new QualitativeValueOrString(); this.fuelType.setQualitativeValue(qualitativeValue); return this; @@ -259,13 +263,13 @@ public Builder fuelType(QualitativeValue qualitativeValue) { /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder fuelType(QualitativeValue.Builder qualitativeValue) { return this.fuelType(qualitativeValue.build()); } /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(String fuelType) { + @NotNull public Builder fuelType(String fuelType) { if (this.fuelType == null) this.fuelType = new QualitativeValueOrString(); this.fuelType.setString(fuelType); return this; @@ -273,14 +277,14 @@ public Builder fuelType(String fuelType) { /** * The color or color combination of the interior of the vehicle. */ - public Builder vehicleInteriorColor(String vehicleInteriorColor) { + @NotNull public Builder vehicleInteriorColor(String vehicleInteriorColor) { this.vehicleInteriorColor = vehicleInteriorColor; return this; } /** * The type or material of the interior of the vehicle (e.g. synthetic fabric, leather, wood, etc.). While most interior types are characterized by the material used, an interior type can also be based on vehicle usage or target audience. */ - public Builder vehicleInteriorType(String vehicleInteriorType) { + @NotNull public Builder vehicleInteriorType(String vehicleInteriorType) { this.vehicleInteriorType = vehicleInteriorType; return this; } @@ -288,7 +292,7 @@ public Builder vehicleInteriorType(String vehicleInteriorType) { * The total distance travelled by the particular vehicle since its initial production, as read from its odometer.
Typical unit code(s): KMT for kilometers, SMI for statute miles */ - public Builder mileageFromOdometer(QuantitativeValue quantitativeValue) { + @NotNull public Builder mileageFromOdometer(QuantitativeValue quantitativeValue) { this.mileageFromOdometer = quantitativeValue; return this; } @@ -296,13 +300,13 @@ public Builder mileageFromOdometer(QuantitativeValue quantitativeValue) { * The total distance travelled by the particular vehicle since its initial production, as read from its odometer.
Typical unit code(s): KMT for kilometers, SMI for statute miles */ - public Builder mileageFromOdometer(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder mileageFromOdometer(QuantitativeValue.Builder quantitativeValue) { return this.mileageFromOdometer(quantitativeValue.build()); } /** * The release date of a vehicle model (often used to differentiate versions of the same make and model). */ - public Builder vehicleModelDate(java.util.Date date) { + @NotNull public Builder vehicleModelDate(java.util.Date date) { this.vehicleModelDate = date; return this; } @@ -310,7 +314,7 @@ public Builder vehicleModelDate(java.util.Date date) { * The number of owners of the vehicle, including the current one.
Typical unit code(s): C62 */ - public Builder numberOfPreviousOwners(Number number) { + @NotNull public Builder numberOfPreviousOwners(Number number) { if (this.numberOfPreviousOwners == null) this.numberOfPreviousOwners = new NumberOrQuantitativeValue(); this.numberOfPreviousOwners.setNumber(number); return this; @@ -319,7 +323,7 @@ public Builder numberOfPreviousOwners(Number number) { * The number of owners of the vehicle, including the current one.
Typical unit code(s): C62 */ - public Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue) { if (this.numberOfPreviousOwners == null) this.numberOfPreviousOwners = new NumberOrQuantitativeValue(); this.numberOfPreviousOwners.setQuantitativeValue(quantitativeValue); return this; @@ -328,20 +332,20 @@ public Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue) { * The number of owners of the vehicle, including the current one.
Typical unit code(s): C62 */ - public Builder numberOfPreviousOwners(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfPreviousOwners(QuantitativeValue.Builder quantitativeValue) { return this.numberOfPreviousOwners(quantitativeValue.build()); } /** * The date of production of the item, e.g. vehicle. */ - public Builder productionDate(java.util.Date date) { + @NotNull public Builder productionDate(java.util.Date date) { this.productionDate = date; return this; } /** * The date the item e.g. vehicle was purchased by the current owner. */ - public Builder purchaseDate(java.util.Date date) { + @NotNull public Builder purchaseDate(java.util.Date date) { this.purchaseDate = date; return this; } @@ -349,7 +353,7 @@ public Builder purchaseDate(java.util.Date date) { * The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.
Typical unit code(s): C62 for persons */ - public Builder vehicleSeatingCapacity(Number number) { + @NotNull public Builder vehicleSeatingCapacity(Number number) { if (this.vehicleSeatingCapacity == null) this.vehicleSeatingCapacity = new NumberOrQuantitativeValue(); this.vehicleSeatingCapacity.setNumber(number); return this; @@ -358,7 +362,7 @@ public Builder vehicleSeatingCapacity(Number number) { * The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.
Typical unit code(s): C62 for persons */ - public Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue) { + @NotNull public Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue) { if (this.vehicleSeatingCapacity == null) this.vehicleSeatingCapacity = new NumberOrQuantitativeValue(); this.vehicleSeatingCapacity.setQuantitativeValue(quantitativeValue); return this; @@ -367,13 +371,13 @@ public Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue) { * The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.
Typical unit code(s): C62 for persons */ - public Builder vehicleSeatingCapacity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder vehicleSeatingCapacity(QuantitativeValue.Builder quantitativeValue) { return this.vehicleSeatingCapacity(quantitativeValue.build()); } /** * The type of component used for transmitting the power from a rotating power source to the wheels or other relevant component(s) ("gearbox" for cars). */ - public Builder vehicleTransmission(QualitativeValue qualitativeValue) { + @NotNull public Builder vehicleTransmission(QualitativeValue qualitativeValue) { if (this.vehicleTransmission == null) this.vehicleTransmission = new QualitativeValueOrString(); this.vehicleTransmission.setQualitativeValue(qualitativeValue); return this; @@ -381,13 +385,13 @@ public Builder vehicleTransmission(QualitativeValue qualitativeValue) { /** * The type of component used for transmitting the power from a rotating power source to the wheels or other relevant component(s) ("gearbox" for cars). */ - public Builder vehicleTransmission(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder vehicleTransmission(QualitativeValue.Builder qualitativeValue) { return this.vehicleTransmission(qualitativeValue.build()); } /** * The type of component used for transmitting the power from a rotating power source to the wheels or other relevant component(s) ("gearbox" for cars). */ - public Builder vehicleTransmission(String vehicleTransmission) { + @NotNull public Builder vehicleTransmission(String vehicleTransmission) { if (this.vehicleTransmission == null) this.vehicleTransmission = new QualitativeValueOrString(); this.vehicleTransmission.setString(vehicleTransmission); return this; @@ -395,53 +399,53 @@ public Builder vehicleTransmission(String vehicleTransmission) { /** * The position of the steering wheel or similar device (mostly for cars). */ - public Builder steeringPosition(SteeringPositionValue steeringPositionValue) { + @NotNull public Builder steeringPosition(SteeringPositionValue steeringPositionValue) { this.steeringPosition = steeringPositionValue; return this; } /** * The position of the steering wheel or similar device (mostly for cars). */ - public Builder steeringPosition(SteeringPositionValue.Builder steeringPositionValue) { + @NotNull public Builder steeringPosition(SteeringPositionValue.Builder steeringPositionValue) { return this.steeringPosition(steeringPositionValue.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -449,13 +453,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -463,13 +467,13 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -477,13 +481,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -491,7 +495,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -499,20 +503,20 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The color of the product. */ - public Builder color(String color) { + @NotNull public Builder color(String color) { this.color = color; return this; } /** * The depth of the item. */ - public Builder depth(Distance distance) { + @NotNull public Builder depth(Distance distance) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setDistance(distance); return this; @@ -520,13 +524,13 @@ public Builder depth(Distance distance) { /** * The depth of the item. */ - public Builder depth(Distance.Builder distance) { + @NotNull public Builder depth(Distance.Builder distance) { return this.depth(distance.build()); } /** * The depth of the item. */ - public Builder depth(QuantitativeValue quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue quantitativeValue) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setQuantitativeValue(quantitativeValue); return this; @@ -534,41 +538,41 @@ public Builder depth(QuantitativeValue quantitativeValue) { /** * The depth of the item. */ - public Builder depth(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue.Builder quantitativeValue) { return this.depth(quantitativeValue.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -576,13 +580,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -590,78 +594,78 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product product) { this.isAccessoryOrSparePartFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product.Builder product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product.Builder product) { return this.isAccessoryOrSparePartFor(product.build()); } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product product) { + @NotNull public Builder isConsumableFor(Product product) { this.isConsumableFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product.Builder product) { + @NotNull public Builder isConsumableFor(Product.Builder product) { return this.isConsumableFor(product.build()); } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product product) { + @NotNull public Builder isRelatedTo(Product product) { this.isRelatedTo = product; return this; } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product.Builder product) { + @NotNull public Builder isRelatedTo(Product.Builder product) { return this.isRelatedTo(product.build()); } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product product) { + @NotNull public Builder isSimilarTo(Product product) { this.isSimilarTo = product; return this; } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product.Builder product) { + @NotNull public Builder isSimilarTo(Product.Builder product) { return this.isSimilarTo(product.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -669,13 +673,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -683,20 +687,20 @@ public Builder logo(String logo) { /** * The manufacturer of the product. */ - public Builder manufacturer(Organization organization) { + @NotNull public Builder manufacturer(Organization organization) { this.manufacturer = organization; return this; } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization.Builder organization) { + @NotNull public Builder manufacturer(Organization.Builder organization) { return this.manufacturer(organization.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel productModel) { + @NotNull public Builder model(ProductModel productModel) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setProductModel(productModel); return this; @@ -704,13 +708,13 @@ public Builder model(ProductModel productModel) { /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel.Builder productModel) { + @NotNull public Builder model(ProductModel.Builder productModel) { return this.model(productModel.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(String model) { + @NotNull public Builder model(String model) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setString(model); return this; @@ -718,74 +722,74 @@ public Builder model(String model) { /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The product identifier, such as ISBN. For example: <meta itemprop='productID' content='isbn:123-456-789'/>. */ - public Builder productID(String productID) { + @NotNull public Builder productID(String productID) { this.productID = productID; return this; } /** * The release date of a product or product model. This can be used to distinguish the exact variant of a product. */ - public Builder releaseDate(java.util.Date date) { + @NotNull public Builder releaseDate(java.util.Date date) { this.releaseDate = date; return this; } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue quantitativeValue) { this.weight = quantitativeValue; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue.Builder quantitativeValue) { return this.weight(quantitativeValue.build()); } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -793,13 +797,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -807,7 +811,7 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** @@ -816,7 +820,7 @@ public Builder width(QuantitativeValue.Builder quantitativeValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -826,27 +830,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -880,7 +884,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -915,7 +919,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -948,7 +952,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -956,38 +960,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1058,126 +1062,126 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder numberOfDoors(Number number); - Builder numberOfDoors(QuantitativeValue quantitativeValue); - Builder numberOfDoors(QuantitativeValue.Builder quantitativeValue); - Builder numberOfAirbags(Number number); - Builder numberOfAirbags(String numberOfAirbags); - Builder numberOfAxles(Number number); - Builder numberOfAxles(QuantitativeValue quantitativeValue); - Builder numberOfAxles(QuantitativeValue.Builder quantitativeValue); - Builder vehicleEngine(EngineSpecification engineSpecification); - Builder vehicleEngine(EngineSpecification.Builder engineSpecification); - Builder fuelConsumption(QuantitativeValue quantitativeValue); - Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue); - Builder fuelEfficiency(QuantitativeValue quantitativeValue); - Builder fuelEfficiency(QuantitativeValue.Builder quantitativeValue); - Builder numberOfForwardGears(Number number); - Builder numberOfForwardGears(QuantitativeValue quantitativeValue); - Builder numberOfForwardGears(QuantitativeValue.Builder quantitativeValue); - Builder vin(String vin); - Builder cargoVolume(QuantitativeValue quantitativeValue); - Builder cargoVolume(QuantitativeValue.Builder quantitativeValue); - Builder vehicleConfiguration(String vehicleConfiguration); - Builder knownVehicleDamages(String knownVehicleDamages); - Builder dateVehicleFirstRegistered(java.util.Date date); - Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelConfigurationValue); - Builder driveWheelConfiguration(DriveWheelConfigurationValue.Builder driveWheelConfigurationValue); - Builder driveWheelConfiguration(String driveWheelConfiguration); - Builder fuelType(QualitativeValue qualitativeValue); - Builder fuelType(QualitativeValue.Builder qualitativeValue); - Builder fuelType(String fuelType); - Builder vehicleInteriorColor(String vehicleInteriorColor); - Builder vehicleInteriorType(String vehicleInteriorType); - Builder mileageFromOdometer(QuantitativeValue quantitativeValue); - Builder mileageFromOdometer(QuantitativeValue.Builder quantitativeValue); - Builder vehicleModelDate(java.util.Date date); - Builder numberOfPreviousOwners(Number number); - Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue); - Builder numberOfPreviousOwners(QuantitativeValue.Builder quantitativeValue); - Builder productionDate(java.util.Date date); - Builder purchaseDate(java.util.Date date); - Builder vehicleSeatingCapacity(Number number); - Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue); - Builder vehicleSeatingCapacity(QuantitativeValue.Builder quantitativeValue); - Builder vehicleTransmission(QualitativeValue qualitativeValue); - Builder vehicleTransmission(QualitativeValue.Builder qualitativeValue); - Builder vehicleTransmission(String vehicleTransmission); - Builder steeringPosition(SteeringPositionValue steeringPositionValue); - Builder steeringPosition(SteeringPositionValue.Builder steeringPositionValue); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder color(String color); - Builder depth(Distance distance); - Builder depth(Distance.Builder distance); - Builder depth(QuantitativeValue quantitativeValue); - Builder depth(QuantitativeValue.Builder quantitativeValue); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder isAccessoryOrSparePartFor(Product product); - Builder isAccessoryOrSparePartFor(Product.Builder product); - Builder isConsumableFor(Product product); - Builder isConsumableFor(Product.Builder product); - Builder isRelatedTo(Product product); - Builder isRelatedTo(Product.Builder product); - Builder isSimilarTo(Product product); - Builder isSimilarTo(Product.Builder product); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder manufacturer(Organization organization); - Builder manufacturer(Organization.Builder organization); - Builder model(ProductModel productModel); - Builder model(ProductModel.Builder productModel); - Builder model(String model); - Builder mpn(String mpn); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder productID(String productID); - Builder releaseDate(java.util.Date date); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sku(String sku); - Builder weight(QuantitativeValue quantitativeValue); - Builder weight(QuantitativeValue.Builder quantitativeValue); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder numberOfDoors(Number number); + @NotNull Builder numberOfDoors(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfDoors(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder numberOfAirbags(Number number); + @NotNull Builder numberOfAirbags(String numberOfAirbags); + @NotNull Builder numberOfAxles(Number number); + @NotNull Builder numberOfAxles(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfAxles(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vehicleEngine(EngineSpecification engineSpecification); + @NotNull Builder vehicleEngine(EngineSpecification.Builder engineSpecification); + @NotNull Builder fuelConsumption(QuantitativeValue quantitativeValue); + @NotNull Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder fuelEfficiency(QuantitativeValue quantitativeValue); + @NotNull Builder fuelEfficiency(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder numberOfForwardGears(Number number); + @NotNull Builder numberOfForwardGears(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfForwardGears(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vin(String vin); + @NotNull Builder cargoVolume(QuantitativeValue quantitativeValue); + @NotNull Builder cargoVolume(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vehicleConfiguration(String vehicleConfiguration); + @NotNull Builder knownVehicleDamages(String knownVehicleDamages); + @NotNull Builder dateVehicleFirstRegistered(java.util.Date date); + @NotNull Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelConfigurationValue); + @NotNull Builder driveWheelConfiguration(DriveWheelConfigurationValue.Builder driveWheelConfigurationValue); + @NotNull Builder driveWheelConfiguration(String driveWheelConfiguration); + @NotNull Builder fuelType(QualitativeValue qualitativeValue); + @NotNull Builder fuelType(QualitativeValue.Builder qualitativeValue); + @NotNull Builder fuelType(String fuelType); + @NotNull Builder vehicleInteriorColor(String vehicleInteriorColor); + @NotNull Builder vehicleInteriorType(String vehicleInteriorType); + @NotNull Builder mileageFromOdometer(QuantitativeValue quantitativeValue); + @NotNull Builder mileageFromOdometer(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vehicleModelDate(java.util.Date date); + @NotNull Builder numberOfPreviousOwners(Number number); + @NotNull Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfPreviousOwners(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder productionDate(java.util.Date date); + @NotNull Builder purchaseDate(java.util.Date date); + @NotNull Builder vehicleSeatingCapacity(Number number); + @NotNull Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue); + @NotNull Builder vehicleSeatingCapacity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vehicleTransmission(QualitativeValue qualitativeValue); + @NotNull Builder vehicleTransmission(QualitativeValue.Builder qualitativeValue); + @NotNull Builder vehicleTransmission(String vehicleTransmission); + @NotNull Builder steeringPosition(SteeringPositionValue steeringPositionValue); + @NotNull Builder steeringPosition(SteeringPositionValue.Builder steeringPositionValue); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder color(String color); + @NotNull Builder depth(Distance distance); + @NotNull Builder depth(Distance.Builder distance); + @NotNull Builder depth(QuantitativeValue quantitativeValue); + @NotNull Builder depth(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder isAccessoryOrSparePartFor(Product product); + @NotNull Builder isAccessoryOrSparePartFor(Product.Builder product); + @NotNull Builder isConsumableFor(Product product); + @NotNull Builder isConsumableFor(Product.Builder product); + @NotNull Builder isRelatedTo(Product product); + @NotNull Builder isRelatedTo(Product.Builder product); + @NotNull Builder isSimilarTo(Product product); + @NotNull Builder isSimilarTo(Product.Builder product); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder manufacturer(Organization organization); + @NotNull Builder manufacturer(Organization.Builder organization); + @NotNull Builder model(ProductModel productModel); + @NotNull Builder model(ProductModel.Builder productModel); + @NotNull Builder model(String model); + @NotNull Builder mpn(String mpn); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder productID(String productID); + @NotNull Builder releaseDate(java.util.Date date); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sku(String sku); + @NotNull Builder weight(QuantitativeValue quantitativeValue); + @NotNull Builder weight(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/CarUsageType.java b/src/main/java/org/schema/CarUsageType.java index baaff2b1..848ace3a 100644 --- a/src/main/java/org/schema/CarUsageType.java +++ b/src/main/java/org/schema/CarUsageType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A value indicating a special usage of a car, e.g. commercial rental, driving school, or as a taxi. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class CarUsageType extends QualitativeValue { /** * Builder for {@link CarUsageType} */ - public static final class CarUsageTypeThingBuilder implements Builder { + static final class CarUsageTypeThingBuilder implements Builder { /** * Creates new {@link CarUsageType} instance. */ @@ -36,85 +40,85 @@ public CarUsageType build() { /** * This ordering relation for qualitative values indicates that the subject is equal to the object. */ - public Builder equal(QualitativeValue qualitativeValue) { + @NotNull public Builder equal(QualitativeValue qualitativeValue) { this.equal = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is equal to the object. */ - public Builder equal(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder equal(QualitativeValue.Builder qualitativeValue) { return this.equal(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is greater than the object. */ - public Builder greater(QualitativeValue qualitativeValue) { + @NotNull public Builder greater(QualitativeValue qualitativeValue) { this.greater = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is greater than the object. */ - public Builder greater(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder greater(QualitativeValue.Builder qualitativeValue) { return this.greater(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is greater than or equal to the object. */ - public Builder greaterOrEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder greaterOrEqual(QualitativeValue qualitativeValue) { this.greaterOrEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is greater than or equal to the object. */ - public Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue) { return this.greaterOrEqual(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is lesser than the object. */ - public Builder lesser(QualitativeValue qualitativeValue) { + @NotNull public Builder lesser(QualitativeValue qualitativeValue) { this.lesser = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is lesser than the object. */ - public Builder lesser(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lesser(QualitativeValue.Builder qualitativeValue) { return this.lesser(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object. */ - public Builder lesserOrEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder lesserOrEqual(QualitativeValue qualitativeValue) { this.lesserOrEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object. */ - public Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue) { return this.lesserOrEqual(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is not equal to the object. */ - public Builder nonEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder nonEqual(QualitativeValue qualitativeValue) { this.nonEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is not equal to the object. */ - public Builder nonEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder nonEqual(QualitativeValue.Builder qualitativeValue) { return this.nonEqual(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration enumeration) { + @NotNull public Builder valueReference(Enumeration enumeration) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setEnumeration(enumeration); return this; @@ -122,13 +126,13 @@ public Builder valueReference(Enumeration enumeration) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration.Builder enumeration) { + @NotNull public Builder valueReference(Enumeration.Builder enumeration) { return this.valueReference(enumeration.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue propertyValue) { + @NotNull public Builder valueReference(PropertyValue propertyValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setPropertyValue(propertyValue); return this; @@ -136,13 +140,13 @@ public Builder valueReference(PropertyValue propertyValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue.Builder propertyValue) { + @NotNull public Builder valueReference(PropertyValue.Builder propertyValue) { return this.valueReference(propertyValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue qualitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQualitativeValue(qualitativeValue); return this; @@ -150,13 +154,13 @@ public Builder valueReference(QualitativeValue qualitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue.Builder qualitativeValue) { return this.valueReference(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue quantitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQuantitativeValue(quantitativeValue); return this; @@ -164,13 +168,13 @@ public Builder valueReference(QuantitativeValue quantitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { return this.valueReference(quantitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue structuredValue) { + @NotNull public Builder valueReference(StructuredValue structuredValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setStructuredValue(structuredValue); return this; @@ -178,7 +182,7 @@ public Builder valueReference(StructuredValue structuredValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue.Builder structuredValue) { + @NotNull public Builder valueReference(StructuredValue.Builder structuredValue) { return this.valueReference(structuredValue.build()); } /** @@ -187,7 +191,7 @@ public Builder valueReference(StructuredValue.Builder structuredValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -197,13 +201,13 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -211,13 +215,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -225,27 +229,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -279,7 +283,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -314,7 +318,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -347,7 +351,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -355,38 +359,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -413,46 +417,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder equal(QualitativeValue qualitativeValue); - Builder equal(QualitativeValue.Builder qualitativeValue); - Builder greater(QualitativeValue qualitativeValue); - Builder greater(QualitativeValue.Builder qualitativeValue); - Builder greaterOrEqual(QualitativeValue qualitativeValue); - Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue); - Builder lesser(QualitativeValue qualitativeValue); - Builder lesser(QualitativeValue.Builder qualitativeValue); - Builder lesserOrEqual(QualitativeValue qualitativeValue); - Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue); - Builder nonEqual(QualitativeValue qualitativeValue); - Builder nonEqual(QualitativeValue.Builder qualitativeValue); - Builder valueReference(Enumeration enumeration); - Builder valueReference(Enumeration.Builder enumeration); - Builder valueReference(PropertyValue propertyValue); - Builder valueReference(PropertyValue.Builder propertyValue); - Builder valueReference(QualitativeValue qualitativeValue); - Builder valueReference(QualitativeValue.Builder qualitativeValue); - Builder valueReference(QuantitativeValue quantitativeValue); - Builder valueReference(QuantitativeValue.Builder quantitativeValue); - Builder valueReference(StructuredValue structuredValue); - Builder valueReference(StructuredValue.Builder structuredValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder equal(QualitativeValue qualitativeValue); + @NotNull Builder equal(QualitativeValue.Builder qualitativeValue); + @NotNull Builder greater(QualitativeValue qualitativeValue); + @NotNull Builder greater(QualitativeValue.Builder qualitativeValue); + @NotNull Builder greaterOrEqual(QualitativeValue qualitativeValue); + @NotNull Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lesser(QualitativeValue qualitativeValue); + @NotNull Builder lesser(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lesserOrEqual(QualitativeValue qualitativeValue); + @NotNull Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder nonEqual(QualitativeValue qualitativeValue); + @NotNull Builder nonEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(Enumeration enumeration); + @NotNull Builder valueReference(Enumeration.Builder enumeration); + @NotNull Builder valueReference(PropertyValue propertyValue); + @NotNull Builder valueReference(PropertyValue.Builder propertyValue); + @NotNull Builder valueReference(QualitativeValue qualitativeValue); + @NotNull Builder valueReference(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(QuantitativeValue quantitativeValue); + @NotNull Builder valueReference(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder valueReference(StructuredValue structuredValue); + @NotNull Builder valueReference(StructuredValue.Builder structuredValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Cardiovascular.java b/src/main/java/org/schema/Cardiovascular.java index 3f87d0fe..9f1bc8de 100644 --- a/src/main/java/org/schema/Cardiovascular.java +++ b/src/main/java/org/schema/Cardiovascular.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to diagnosis and treatment of disorders of heart and vasculature. */ @@ -25,7 +29,7 @@ public class Cardiovascular { /** * Builder for {@link Cardiovascular} */ - public static final class CardiovascularThingBuilder implements Builder { + static final class CardiovascularThingBuilder implements Builder { /** * Creates new {@link Cardiovascular} instance. */ @@ -34,7 +38,7 @@ public Cardiovascular build() { } } public interface Builder extends ThingBuilder { - + } protected Cardiovascular() { diff --git a/src/main/java/org/schema/CardiovascularExam.java b/src/main/java/org/schema/CardiovascularExam.java index adff4f04..21dd59f2 100644 --- a/src/main/java/org/schema/CardiovascularExam.java +++ b/src/main/java/org/schema/CardiovascularExam.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Cardiovascular. */ @@ -25,7 +29,7 @@ public class CardiovascularExam { /** * Builder for {@link CardiovascularExam} */ - public static final class CardiovascularExamThingBuilder implements Builder { + static final class CardiovascularExamThingBuilder implements Builder { /** * Creates new {@link CardiovascularExam} instance. */ @@ -34,7 +38,7 @@ public CardiovascularExam build() { } } public interface Builder extends ThingBuilder { - + } protected CardiovascularExam() { diff --git a/src/main/java/org/schema/CaseSeries.java b/src/main/java/org/schema/CaseSeries.java index caef73fd..a212e320 100644 --- a/src/main/java/org/schema/CaseSeries.java +++ b/src/main/java/org/schema/CaseSeries.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A case series (also known as a clinical series) is a medical research study that tracks patients with a known exposure given similar treatment or examines their medical records for exposure and outcome. A case series can be retrospective or prospective and usually involves a smaller number of patients than the more powerful case-control studies or randomized controlled trials. Case series may be consecutive or non-consecutive, depending on whether all cases presenting to the reporting authors over a period of time were included, or only a selection. */ @@ -25,7 +29,7 @@ public class CaseSeries { /** * Builder for {@link CaseSeries} */ - public static final class CaseSeriesThingBuilder implements Builder { + static final class CaseSeriesThingBuilder implements Builder { /** * Creates new {@link CaseSeries} instance. */ @@ -34,7 +38,7 @@ public CaseSeries build() { } } public interface Builder extends ThingBuilder { - + } protected CaseSeries() { diff --git a/src/main/java/org/schema/Casino.java b/src/main/java/org/schema/Casino.java index 811a20e6..90bfb901 100644 --- a/src/main/java/org/schema/Casino.java +++ b/src/main/java/org/schema/Casino.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A casino. */ @@ -25,7 +29,7 @@ public class Casino extends EntertainmentBusiness { /** * Builder for {@link Casino} */ - public static final class CasinoThingBuilder implements Builder { + static final class CasinoThingBuilder implements Builder { /** * Creates new {@link Casino} instance. */ @@ -35,107 +39,107 @@ public Casino build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CassetteFormat.java b/src/main/java/org/schema/CassetteFormat.java index 6088ac3c..9ac9b9f7 100644 --- a/src/main/java/org/schema/CassetteFormat.java +++ b/src/main/java/org/schema/CassetteFormat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * CassetteFormat. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class CassetteFormat { /** * Builder for {@link CassetteFormat} */ - public static final class CassetteFormatThingBuilder implements Builder { + static final class CassetteFormatThingBuilder implements Builder { /** * Creates new {@link CassetteFormat} instance. */ @@ -35,7 +39,7 @@ public CassetteFormat build() { } } public interface Builder extends ThingBuilder { - + } protected CassetteFormat() { diff --git a/src/main/java/org/schema/CatholicChurch.java b/src/main/java/org/schema/CatholicChurch.java index 83336553..c458b64f 100644 --- a/src/main/java/org/schema/CatholicChurch.java +++ b/src/main/java/org/schema/CatholicChurch.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A Catholic church. */ @@ -25,7 +29,7 @@ public class CatholicChurch extends PlaceOfWorship { /** * Builder for {@link CatholicChurch} */ - public static final class CatholicChurchThingBuilder implements Builder { + static final class CatholicChurchThingBuilder implements Builder { /** * Creates new {@link CatholicChurch} instance. */ @@ -35,73 +39,73 @@ public CatholicChurch build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Cemetery.java b/src/main/java/org/schema/Cemetery.java index 623702ab..94940402 100644 --- a/src/main/java/org/schema/Cemetery.java +++ b/src/main/java/org/schema/Cemetery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A graveyard. */ @@ -25,7 +29,7 @@ public class Cemetery extends CivicStructure { /** * Builder for {@link Cemetery} */ - public static final class CemeteryThingBuilder implements Builder { + static final class CemeteryThingBuilder implements Builder { /** * Creates new {@link Cemetery} instance. */ @@ -35,73 +39,73 @@ public Cemetery build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CheckAction.java b/src/main/java/org/schema/CheckAction.java index 543da704..867d3c32 100644 --- a/src/main/java/org/schema/CheckAction.java +++ b/src/main/java/org/schema/CheckAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent inspects/determines/investigates/inquire or examine an object's accuracy/quality/condition or state. */ @@ -25,7 +29,7 @@ public class CheckAction extends FindAction { /** * Builder for {@link CheckAction} */ - public static final class CheckActionThingBuilder implements Builder { + static final class CheckActionThingBuilder implements Builder { /** * Creates new {@link CheckAction} instance. */ @@ -35,7 +39,7 @@ public CheckAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CheckInAction.java b/src/main/java/org/schema/CheckInAction.java index 1061c412..ae1d09c3 100644 --- a/src/main/java/org/schema/CheckInAction.java +++ b/src/main/java/org/schema/CheckInAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of an agent communicating (service provider, social media, etc) their arrival by registering/confirming for a previously reserved service (e.g. flight check in) or at a place (e.g. hotel), possibly resulting in a result (boarding pass, etc).

Related actions:

  • CheckOutAction: The antonym of CheckInAction.
  • ArriveAction: Unlike ArriveAction, CheckInAction implies that the agent is informing/confirming the start of a previously reserved service.
  • ConfirmAction: Unlike ConfirmAction, CheckInAction implies that the agent is informing/confirming the *start* of a previously reserved service rather than its validity/existence
. */ @@ -25,7 +29,7 @@ public class CheckInAction extends CommunicateAction { /** * Builder for {@link CheckInAction} */ - public static final class CheckInActionThingBuilder implements Builder { + static final class CheckInActionThingBuilder implements Builder { /** * Creates new {@link CheckInAction} instance. */ @@ -35,20 +39,20 @@ public CheckInAction build() { /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -56,13 +60,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -70,7 +74,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -78,13 +82,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -92,13 +96,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -106,13 +110,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -120,13 +124,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -134,7 +138,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -142,7 +146,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -151,67 +155,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -245,7 +249,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -280,7 +284,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -313,7 +317,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -321,38 +325,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -379,41 +383,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CheckOutAction.java b/src/main/java/org/schema/CheckOutAction.java index 3238bddf..90fc56b5 100644 --- a/src/main/java/org/schema/CheckOutAction.java +++ b/src/main/java/org/schema/CheckOutAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of an agent communicating (service provider, social media, etc) their departure of a previously reserved service (e.g. flight check in) or place (e.g. hotel).

Related actions:

  • CheckInAction: The antonym of CheckOutAction.
  • DepartAction: Unlike DepartAction, CheckOutAction implies that the agent is informing/confirming the end of a previously reserved service.
  • CancelAction: Unlike CancelAction, CheckOutAction implies that the agent is informing/confirming the end of a previously reserved service
. */ @@ -25,7 +29,7 @@ public class CheckOutAction extends CommunicateAction { /** * Builder for {@link CheckOutAction} */ - public static final class CheckOutActionThingBuilder implements Builder { + static final class CheckOutActionThingBuilder implements Builder { /** * Creates new {@link CheckOutAction} instance. */ @@ -35,20 +39,20 @@ public CheckOutAction build() { /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -56,13 +60,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -70,7 +74,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -78,13 +82,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -92,13 +96,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -106,13 +110,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -120,13 +124,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -134,7 +138,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -142,7 +146,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -151,67 +155,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -245,7 +249,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -280,7 +284,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -313,7 +317,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -321,38 +325,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -379,41 +383,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CheckoutPage.java b/src/main/java/org/schema/CheckoutPage.java index 8f23985a..08bfdece 100644 --- a/src/main/java/org/schema/CheckoutPage.java +++ b/src/main/java/org/schema/CheckoutPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web page type: Checkout page. */ @@ -25,7 +29,7 @@ public class CheckoutPage extends WebPage { /** * Builder for {@link CheckoutPage} */ - public static final class CheckoutPageThingBuilder implements Builder { + static final class CheckoutPageThingBuilder implements Builder { /** * Creates new {@link CheckoutPage} instance. */ @@ -35,7 +39,7 @@ public CheckoutPage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/ChildCare.java b/src/main/java/org/schema/ChildCare.java index 65b6d48c..4f798a0a 100644 --- a/src/main/java/org/schema/ChildCare.java +++ b/src/main/java/org/schema/ChildCare.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A Childcare center. */ @@ -25,7 +29,7 @@ public class ChildCare extends LocalBusiness { /** * Builder for {@link ChildCare} */ - public static final class ChildCareThingBuilder implements Builder { + static final class ChildCareThingBuilder implements Builder { /** * Creates new {@link ChildCare} instance. */ @@ -35,107 +39,107 @@ public ChildCare build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ChildrensEvent.java b/src/main/java/org/schema/ChildrensEvent.java index dd3ec2a1..3228fd08 100644 --- a/src/main/java/org/schema/ChildrensEvent.java +++ b/src/main/java/org/schema/ChildrensEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Children's event. */ @@ -25,7 +29,7 @@ public class ChildrensEvent extends Event { /** * Builder for {@link ChildrensEvent} */ - public static final class ChildrensEventThingBuilder implements Builder { + static final class ChildrensEventThingBuilder implements Builder { /** * Creates new {@link ChildrensEvent} instance. */ @@ -35,20 +39,20 @@ public ChildrensEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Chiropractic.java b/src/main/java/org/schema/Chiropractic.java index c8b122e4..bc59c36f 100644 --- a/src/main/java/org/schema/Chiropractic.java +++ b/src/main/java/org/schema/Chiropractic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A system of medicine focused on the relationship between the body's structure, mainly the spine, and its functioning. */ @@ -25,7 +29,7 @@ public class Chiropractic { /** * Builder for {@link Chiropractic} */ - public static final class ChiropracticThingBuilder implements Builder { + static final class ChiropracticThingBuilder implements Builder { /** * Creates new {@link Chiropractic} instance. */ @@ -34,7 +38,7 @@ public Chiropractic build() { } } public interface Builder extends ThingBuilder { - + } protected Chiropractic() { diff --git a/src/main/java/org/schema/ChooseAction.java b/src/main/java/org/schema/ChooseAction.java index 2b519737..d0e3336c 100644 --- a/src/main/java/org/schema/ChooseAction.java +++ b/src/main/java/org/schema/ChooseAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of expressing a preference from a set of options or a large or unbounded set of choices/options. */ @@ -31,7 +35,7 @@ public StringOrThing getActionOption() { /** * Builder for {@link ChooseAction} */ - public static final class ChooseActionThingBuilder implements Builder { + static final class ChooseActionThingBuilder implements Builder { /** * Creates new {@link ChooseAction} instance. */ @@ -41,7 +45,7 @@ public ChooseAction build() { /** * A sub property of object. The options subject to this action. */ - public Builder actionOption(String actionOption) { + @NotNull public Builder actionOption(String actionOption) { if (this.actionOption == null) this.actionOption = new StringOrThing(); this.actionOption.setString(actionOption); return this; @@ -49,7 +53,7 @@ public Builder actionOption(String actionOption) { /** * A sub property of object. The options subject to this action. */ - public Builder actionOption(Thing thing) { + @NotNull public Builder actionOption(Thing thing) { if (this.actionOption == null) this.actionOption = new StringOrThing(); this.actionOption.setThing(thing); return this; @@ -57,13 +61,13 @@ public Builder actionOption(Thing thing) { /** * A sub property of object. The options subject to this action. */ - public Builder actionOption(Thing.Builder thing) { + @NotNull public Builder actionOption(Thing.Builder thing) { return this.actionOption(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -71,13 +75,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -85,7 +89,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -93,7 +97,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -102,67 +106,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -196,7 +200,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -231,7 +235,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -264,7 +268,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -272,38 +276,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -328,33 +332,33 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actionOption(String actionOption); - Builder actionOption(Thing thing); - Builder actionOption(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actionOption(String actionOption); + @NotNull Builder actionOption(Thing thing); + @NotNull Builder actionOption(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ChooseAction(StringOrThing actionOption, 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) { diff --git a/src/main/java/org/schema/Church.java b/src/main/java/org/schema/Church.java index 79c17d1a..d72b30cf 100644 --- a/src/main/java/org/schema/Church.java +++ b/src/main/java/org/schema/Church.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A church. */ @@ -25,7 +29,7 @@ public class Church extends PlaceOfWorship { /** * Builder for {@link Church} */ - public static final class ChurchThingBuilder implements Builder { + static final class ChurchThingBuilder implements Builder { /** * Creates new {@link Church} instance. */ @@ -35,73 +39,73 @@ public Church build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/City.java b/src/main/java/org/schema/City.java index 4c06a0a8..1aef4b0d 100644 --- a/src/main/java/org/schema/City.java +++ b/src/main/java/org/schema/City.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A city or town. */ @@ -25,7 +29,7 @@ public class City extends AdministrativeArea { /** * Builder for {@link City} */ - public static final class CityThingBuilder implements Builder { + static final class CityThingBuilder implements Builder { /** * Creates new {@link City} instance. */ @@ -35,66 +39,66 @@ public City build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CityHall.java b/src/main/java/org/schema/CityHall.java index d68fc3d8..6474420f 100644 --- a/src/main/java/org/schema/CityHall.java +++ b/src/main/java/org/schema/CityHall.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A city hall. */ @@ -25,7 +29,7 @@ public class CityHall extends GovernmentBuilding { /** * Builder for {@link CityHall} */ - public static final class CityHallThingBuilder implements Builder { + static final class CityHallThingBuilder implements Builder { /** * Creates new {@link CityHall} instance. */ @@ -35,73 +39,73 @@ public CityHall build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CivicStructure.java b/src/main/java/org/schema/CivicStructure.java index fde2e7b2..60609609 100644 --- a/src/main/java/org/schema/CivicStructure.java +++ b/src/main/java/org/schema/CivicStructure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A public structure, such as a town hall or concert hall. */ @@ -31,7 +35,7 @@ public String getOpeningHours() { /** * Builder for {@link CivicStructure} */ - public static final class CivicStructureThingBuilder implements Builder { + static final class CivicStructureThingBuilder implements Builder { /** * Creates new {@link CivicStructure} instance. */ @@ -41,73 +45,73 @@ public CivicStructure build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -115,13 +119,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -129,27 +133,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -157,13 +161,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -171,7 +175,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -179,13 +183,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -193,20 +197,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -214,13 +218,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -228,26 +232,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -257,7 +261,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -267,27 +271,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -321,7 +325,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -356,7 +360,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -389,7 +393,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -397,38 +401,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -462,51 +466,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected CivicStructure(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) { diff --git a/src/main/java/org/schema/Clinician.java b/src/main/java/org/schema/Clinician.java index 0abfb2ab..2a4fdd78 100644 --- a/src/main/java/org/schema/Clinician.java +++ b/src/main/java/org/schema/Clinician.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Medical clinicians, including practicing physicians and other medical professionals involved in clinical practice. */ @@ -25,7 +29,7 @@ public class Clinician { /** * Builder for {@link Clinician} */ - public static final class ClinicianThingBuilder implements Builder { + static final class ClinicianThingBuilder implements Builder { /** * Creates new {@link Clinician} instance. */ @@ -34,7 +38,7 @@ public Clinician build() { } } public interface Builder extends ThingBuilder { - + } protected Clinician() { diff --git a/src/main/java/org/schema/Clip.java b/src/main/java/org/schema/Clip.java index 66443cb1..e64ca85c 100644 --- a/src/main/java/org/schema/Clip.java +++ b/src/main/java/org/schema/Clip.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A short TV or radio program or a segment/part of a program. */ @@ -67,7 +71,7 @@ public IsPartOf getPartOfSeries() { /** * Builder for {@link Clip} */ - public static final class ClipThingBuilder implements Builder { + static final class ClipThingBuilder implements Builder { /** * Creates new {@link Clip} instance. */ @@ -77,40 +81,40 @@ public Clip build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * Position of the clip within an ordered group of clips. */ - public Builder clipNumber(Position position) { + @NotNull public Builder clipNumber(Position position) { this.clipNumber = position; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -118,13 +122,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -132,154 +136,154 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The episode to which this clip belongs. */ - public Builder partOfEpisode(IsPartOf isPartOf) { + @NotNull public Builder partOfEpisode(IsPartOf isPartOf) { this.partOfEpisode = isPartOf; return this; } /** * The season to which this episode belongs. */ - public Builder partOfSeason(IsPartOf isPartOf) { + @NotNull public Builder partOfSeason(IsPartOf isPartOf) { this.partOfSeason = isPartOf; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -287,13 +291,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -301,20 +305,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -322,13 +326,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -336,40 +340,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -377,13 +381,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -391,13 +395,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -405,13 +409,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -419,21 +423,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -441,7 +445,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -449,7 +453,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -457,7 +461,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -465,7 +469,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -473,13 +477,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -487,101 +491,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -589,13 +593,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -603,35 +607,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -639,13 +643,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -653,53 +657,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -707,13 +711,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -721,127 +725,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -849,7 +853,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -857,7 +861,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -865,7 +869,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -873,20 +877,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -894,13 +898,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -908,66 +912,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -975,13 +979,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -989,40 +993,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1056,7 +1060,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1091,7 +1095,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1124,7 +1128,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1132,38 +1136,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1233,7 +1237,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1251,156 +1255,156 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder clipNumber(Position position); - Builder director(Person person); - Builder director(Person.Builder person); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder partOfEpisode(IsPartOf isPartOf); - Builder partOfSeason(IsPartOf isPartOf); - Builder partOfSeries(IsPartOf isPartOf); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder clipNumber(Position position); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder partOfEpisode(IsPartOf isPartOf); + @NotNull Builder partOfSeason(IsPartOf isPartOf); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Clip(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) { + protected Clip(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, int 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); myActor = actor; myClipNumber = clipNumber; diff --git a/src/main/java/org/schema/ClothingStore.java b/src/main/java/org/schema/ClothingStore.java index 464837ec..b04cdb3d 100644 --- a/src/main/java/org/schema/ClothingStore.java +++ b/src/main/java/org/schema/ClothingStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A clothing store. */ @@ -25,7 +29,7 @@ public class ClothingStore extends Store { /** * Builder for {@link ClothingStore} */ - public static final class ClothingStoreThingBuilder implements Builder { + static final class ClothingStoreThingBuilder implements Builder { /** * Creates new {@link ClothingStore} instance. */ @@ -35,107 +39,107 @@ public ClothingStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CoOp.java b/src/main/java/org/schema/CoOp.java index 86859b0b..32f6f30c 100644 --- a/src/main/java/org/schema/CoOp.java +++ b/src/main/java/org/schema/CoOp.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Play mode: CoOp. Co-operative games, where you play on the same team with friends. */ @@ -25,7 +29,7 @@ public class CoOp { /** * Builder for {@link CoOp} */ - public static final class CoOpThingBuilder implements Builder { + static final class CoOpThingBuilder implements Builder { /** * Creates new {@link CoOp} instance. */ @@ -34,7 +38,7 @@ public CoOp build() { } } public interface Builder extends ThingBuilder { - + } protected CoOp() { diff --git a/src/main/java/org/schema/Code.java b/src/main/java/org/schema/Code.java index ca63afeb..13fc4696 100644 --- a/src/main/java/org/schema/Code.java +++ b/src/main/java/org/schema/Code.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Computer programming source code. Example: Full (compile ready) solutions, code snippet samples, scripts, templates. */ @@ -25,7 +29,7 @@ public class Code extends CreativeWork { /** * Builder for {@link Code} */ - public static final class CodeThingBuilder implements Builder { + static final class CodeThingBuilder implements Builder { /** * Creates new {@link Code} instance. */ @@ -35,127 +39,127 @@ public Code build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/CohortStudy.java b/src/main/java/org/schema/CohortStudy.java index 3543941d..e710701d 100644 --- a/src/main/java/org/schema/CohortStudy.java +++ b/src/main/java/org/schema/CohortStudy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Also known as a panel study. A cohort study is a form of longitudinal study used in medicine and social science. It is one type of study design and should be compared with a cross-sectional study. A cohort is a group of people who share a common characteristic or experience within a defined period (e.g., are born, leave school, lose their job, are exposed to a drug or a vaccine, etc.). The comparison group may be the general population from which the cohort is drawn, or it may be another cohort of persons thought to have had little or no exposure to the substance under investigation, but otherwise similar. Alternatively, subgroups within the cohort may be compared with each other. */ @@ -25,7 +29,7 @@ public class CohortStudy { /** * Builder for {@link CohortStudy} */ - public static final class CohortStudyThingBuilder implements Builder { + static final class CohortStudyThingBuilder implements Builder { /** * Creates new {@link CohortStudy} instance. */ @@ -34,7 +38,7 @@ public CohortStudy build() { } } public interface Builder extends ThingBuilder { - + } protected CohortStudy() { diff --git a/src/main/java/org/schema/CollectionPage.java b/src/main/java/org/schema/CollectionPage.java index f30a2c2c..31c30dae 100644 --- a/src/main/java/org/schema/CollectionPage.java +++ b/src/main/java/org/schema/CollectionPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web page type: Collection page. */ @@ -25,7 +29,7 @@ public class CollectionPage extends WebPage { /** * Builder for {@link CollectionPage} */ - public static final class CollectionPageThingBuilder implements Builder { + static final class CollectionPageThingBuilder implements Builder { /** * Creates new {@link CollectionPage} instance. */ @@ -35,7 +39,7 @@ public CollectionPage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/CollegeOrUniversity.java b/src/main/java/org/schema/CollegeOrUniversity.java index fc01e27f..6f28fb05 100644 --- a/src/main/java/org/schema/CollegeOrUniversity.java +++ b/src/main/java/org/schema/CollegeOrUniversity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A college, university, or other third-level educational institution. */ @@ -25,7 +29,7 @@ public class CollegeOrUniversity extends EducationalOrganization { /** * Builder for {@link CollegeOrUniversity} */ - public static final class CollegeOrUniversityThingBuilder implements Builder { + static final class CollegeOrUniversityThingBuilder implements Builder { /** * Creates new {@link CollegeOrUniversity} instance. */ @@ -35,53 +39,53 @@ public CollegeOrUniversity build() { /** * Alumni of educational organization. */ - public Builder alumni(Person person) { + @NotNull public Builder alumni(Person person) { this.alumni = person; return this; } /** * Alumni of educational organization. */ - public Builder alumni(Person.Builder person) { + @NotNull public Builder alumni(Person.Builder person) { return this.alumni(person.build()); } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -89,13 +93,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -103,147 +107,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -251,13 +255,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -265,20 +269,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -286,13 +290,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -300,13 +304,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -314,13 +318,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -328,33 +332,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -362,13 +366,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -376,100 +380,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -503,7 +507,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -538,7 +542,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -571,7 +575,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -579,38 +583,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -661,80 +665,80 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder alumni(Person person); - Builder alumni(Person.Builder person); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder alumni(Person person); + @NotNull Builder alumni(Person.Builder person); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ComedyClub.java b/src/main/java/org/schema/ComedyClub.java index ae85e085..b9d8cad0 100644 --- a/src/main/java/org/schema/ComedyClub.java +++ b/src/main/java/org/schema/ComedyClub.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A comedy club. */ @@ -25,7 +29,7 @@ public class ComedyClub extends EntertainmentBusiness { /** * Builder for {@link ComedyClub} */ - public static final class ComedyClubThingBuilder implements Builder { + static final class ComedyClubThingBuilder implements Builder { /** * Creates new {@link ComedyClub} instance. */ @@ -35,107 +39,107 @@ public ComedyClub build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ComedyEvent.java b/src/main/java/org/schema/ComedyEvent.java index 0d646a4d..9dcb36b2 100644 --- a/src/main/java/org/schema/ComedyEvent.java +++ b/src/main/java/org/schema/ComedyEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Comedy event. */ @@ -25,7 +29,7 @@ public class ComedyEvent extends Event { /** * Builder for {@link ComedyEvent} */ - public static final class ComedyEventThingBuilder implements Builder { + static final class ComedyEventThingBuilder implements Builder { /** * Creates new {@link ComedyEvent} instance. */ @@ -35,20 +39,20 @@ public ComedyEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Comment.java b/src/main/java/org/schema/Comment.java index 40794edc..963c276d 100644 --- a/src/main/java/org/schema/Comment.java +++ b/src/main/java/org/schema/Comment.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A comment on an item - for example, a comment on a blog post. The comment's content is expressed via the "text" property, and its topic via "about", properties shared with all CreativeWorks. */ @@ -25,13 +29,13 @@ public class Comment extends CreativeWork { /** * The number of upvotes this question, answer or comment has received from the community. */ - public Integer getUpvoteCount() { + public int getUpvoteCount() { return myUpvoteCount; } /** * The number of downvotes this question, answer or comment has received from the community. */ - public Integer getDownvoteCount() { + public int getDownvoteCount() { return myDownvoteCount; } /** @@ -43,7 +47,7 @@ public Question getParentItem() { /** * Builder for {@link Comment} */ - public static final class CommentThingBuilder implements Builder { + static final class CommentThingBuilder implements Builder { /** * Creates new {@link Comment} instance. */ @@ -53,154 +57,154 @@ public Comment build() { /** * The number of upvotes this question, answer or comment has received from the community. */ - public Builder upvoteCount(Integer integer) { - this.upvoteCount = integer; + @NotNull public Builder upvoteCount(int upvoteCount) { + this.upvoteCount = upvoteCount; return this; } /** * The number of downvotes this question, answer or comment has received from the community. */ - public Builder downvoteCount(Integer integer) { - this.downvoteCount = integer; + @NotNull public Builder downvoteCount(int downvoteCount) { + this.downvoteCount = downvoteCount; return this; } /** * The parent of a question, answer or item in general. */ - public Builder parentItem(Question question) { + @NotNull public Builder parentItem(Question question) { this.parentItem = question; return this; } /** * The parent of a question, answer or item in general. */ - public Builder parentItem(Question.Builder question) { + @NotNull public Builder parentItem(Question.Builder question) { return this.parentItem(question.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -208,13 +212,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -222,20 +226,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -243,13 +247,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -257,40 +261,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -298,13 +302,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -312,13 +316,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -326,13 +330,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -340,21 +344,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -362,7 +366,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -370,7 +374,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -378,7 +382,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -386,7 +390,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -394,13 +398,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -408,101 +412,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -510,13 +514,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -524,35 +528,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -560,13 +564,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -574,53 +578,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -628,13 +632,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -642,127 +646,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -770,7 +774,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -778,7 +782,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -786,7 +790,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -794,20 +798,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -815,13 +819,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -829,66 +833,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -896,13 +900,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -910,40 +914,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -977,7 +981,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1012,7 +1016,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1045,7 +1049,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1053,46 +1057,46 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private Integer upvoteCount; - private Integer downvoteCount; + private int upvoteCount; + private int downvoteCount; private Question parentItem; private String schemaVersion; private Thing about; @@ -1150,7 +1154,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1168,154 +1172,154 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder upvoteCount(Integer integer); - Builder downvoteCount(Integer integer); - Builder parentItem(Question question); - Builder parentItem(Question.Builder question); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder upvoteCount(int upvoteCount); + @NotNull Builder downvoteCount(int downvoteCount); + @NotNull Builder parentItem(Question question); + @NotNull Builder parentItem(Question.Builder question); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Comment(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) { + protected Comment(int upvoteCount, int 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, int 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); myUpvoteCount = upvoteCount; myDownvoteCount = downvoteCount; myParentItem = parentItem; } - private Integer myUpvoteCount; - private Integer myDownvoteCount; + private int myUpvoteCount; + private int myDownvoteCount; private Question myParentItem; } diff --git a/src/main/java/org/schema/CommentAction.java b/src/main/java/org/schema/CommentAction.java index 6c078f50..fe29b5e3 100644 --- a/src/main/java/org/schema/CommentAction.java +++ b/src/main/java/org/schema/CommentAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of generating a comment about a subject. */ @@ -31,7 +35,7 @@ public Comment getResultComment() { /** * Builder for {@link CommentAction} */ - public static final class CommentActionThingBuilder implements Builder { + static final class CommentActionThingBuilder implements Builder { /** * Creates new {@link CommentAction} instance. */ @@ -41,33 +45,33 @@ public CommentAction build() { /** * A sub property of result. The Comment created or sent as a result of this action. */ - public Builder resultComment(Comment comment) { + @NotNull public Builder resultComment(Comment comment) { this.resultComment = comment; return this; } /** * A sub property of result. The Comment created or sent as a result of this action. */ - public Builder resultComment(Comment.Builder comment) { + @NotNull public Builder resultComment(Comment.Builder comment) { return this.resultComment(comment.build()); } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -75,13 +79,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -89,7 +93,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -97,13 +101,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -111,13 +115,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -125,13 +129,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -139,13 +143,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -153,7 +157,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -161,7 +165,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -170,67 +174,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -264,7 +268,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -299,7 +303,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -332,7 +336,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -340,38 +344,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -399,43 +403,43 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder resultComment(Comment comment); - Builder resultComment(Comment.Builder comment); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder resultComment(Comment comment); + @NotNull Builder resultComment(Comment.Builder comment); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected CommentAction(Comment resultComment, 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) { diff --git a/src/main/java/org/schema/CommunicateAction.java b/src/main/java/org/schema/CommunicateAction.java index 86911ca6..0005dd10 100644 --- a/src/main/java/org/schema/CommunicateAction.java +++ b/src/main/java/org/schema/CommunicateAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of conveying information to another person via a communication medium (instrument) such as speech, email, or telephone conversation. */ @@ -43,7 +47,7 @@ public AudienceOrOrganizationOrPerson getRecipient() { /** * Builder for {@link CommunicateAction} */ - public static final class CommunicateActionThingBuilder implements Builder { + static final class CommunicateActionThingBuilder implements Builder { /** * Creates new {@link CommunicateAction} instance. */ @@ -53,20 +57,20 @@ public CommunicateAction build() { /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -74,13 +78,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -88,7 +92,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -96,13 +100,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -110,13 +114,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -124,13 +128,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -138,13 +142,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -152,7 +156,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -160,7 +164,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -169,67 +173,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -263,7 +267,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -298,7 +302,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -331,7 +335,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -339,38 +343,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -397,41 +401,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected CommunicateAction(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) { diff --git a/src/main/java/org/schema/CommunityHealth.java b/src/main/java/org/schema/CommunityHealth.java index acf00ee0..290a2a77 100644 --- a/src/main/java/org/schema/CommunityHealth.java +++ b/src/main/java/org/schema/CommunityHealth.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Community health. */ @@ -25,7 +29,7 @@ public class CommunityHealth { /** * Builder for {@link CommunityHealth} */ - public static final class CommunityHealthThingBuilder implements Builder { + static final class CommunityHealthThingBuilder implements Builder { /** * Creates new {@link CommunityHealth} instance. */ @@ -34,7 +38,7 @@ public CommunityHealth build() { } } public interface Builder extends ThingBuilder { - + } protected CommunityHealth() { diff --git a/src/main/java/org/schema/Competitor.java b/src/main/java/org/schema/Competitor.java index f53878cc..2f55948d 100644 --- a/src/main/java/org/schema/Competitor.java +++ b/src/main/java/org/schema/Competitor.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A competitor in a sports event. */ diff --git a/src/main/java/org/schema/CompilationAlbum.java b/src/main/java/org/schema/CompilationAlbum.java index 04077d34..833d43ac 100644 --- a/src/main/java/org/schema/CompilationAlbum.java +++ b/src/main/java/org/schema/CompilationAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * CompilationAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class CompilationAlbum { /** * Builder for {@link CompilationAlbum} */ - public static final class CompilationAlbumThingBuilder implements Builder { + static final class CompilationAlbumThingBuilder implements Builder { /** * Creates new {@link CompilationAlbum} instance. */ @@ -35,7 +39,7 @@ public CompilationAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected CompilationAlbum() { diff --git a/src/main/java/org/schema/Completed.java b/src/main/java/org/schema/Completed.java index 559f4552..e01b82bf 100644 --- a/src/main/java/org/schema/Completed.java +++ b/src/main/java/org/schema/Completed.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Completed. */ @@ -25,7 +29,7 @@ public class Completed { /** * Builder for {@link Completed} */ - public static final class CompletedThingBuilder implements Builder { + static final class CompletedThingBuilder implements Builder { /** * Creates new {@link Completed} instance. */ @@ -34,7 +38,7 @@ public Completed build() { } } public interface Builder extends ThingBuilder { - + } protected Completed() { diff --git a/src/main/java/org/schema/CompletedActionStatus.java b/src/main/java/org/schema/CompletedActionStatus.java index a08fda0f..ab748890 100644 --- a/src/main/java/org/schema/CompletedActionStatus.java +++ b/src/main/java/org/schema/CompletedActionStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An action that has already taken place. */ @@ -25,7 +29,7 @@ public class CompletedActionStatus { /** * Builder for {@link CompletedActionStatus} */ - public static final class CompletedActionStatusThingBuilder implements Builder { + static final class CompletedActionStatusThingBuilder implements Builder { /** * Creates new {@link CompletedActionStatus} instance. */ @@ -34,7 +38,7 @@ public CompletedActionStatus build() { } } public interface Builder extends ThingBuilder { - + } protected CompletedActionStatus() { diff --git a/src/main/java/org/schema/ComputerStore.java b/src/main/java/org/schema/ComputerStore.java index 6c5219c0..6a1dde90 100644 --- a/src/main/java/org/schema/ComputerStore.java +++ b/src/main/java/org/schema/ComputerStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A computer store. */ @@ -25,7 +29,7 @@ public class ComputerStore extends Store { /** * Builder for {@link ComputerStore} */ - public static final class ComputerStoreThingBuilder implements Builder { + static final class ComputerStoreThingBuilder implements Builder { /** * Creates new {@link ComputerStore} instance. */ @@ -35,107 +39,107 @@ public ComputerStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ConfirmAction.java b/src/main/java/org/schema/ConfirmAction.java index 0fb0e686..f8a3b06b 100644 --- a/src/main/java/org/schema/ConfirmAction.java +++ b/src/main/java/org/schema/ConfirmAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of notifying someone that a future event/action is going to happen as expected.

Related actions:

. */ @@ -25,7 +29,7 @@ public class ConfirmAction extends InformAction { /** * Builder for {@link ConfirmAction} */ - public static final class ConfirmActionThingBuilder implements Builder { + static final class ConfirmActionThingBuilder implements Builder { /** * Creates new {@link ConfirmAction} instance. */ @@ -35,33 +39,33 @@ public ConfirmAction build() { /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -69,13 +73,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -83,7 +87,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -91,13 +95,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -119,13 +123,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -133,13 +137,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -147,7 +151,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -155,7 +159,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -164,67 +168,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -258,7 +262,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -293,7 +297,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -326,7 +330,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -334,38 +338,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -393,43 +397,43 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder event(Event event); - Builder event(Event.Builder event); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ConsumeAction.java b/src/main/java/org/schema/ConsumeAction.java index f46d82ec..5a8ffb9a 100644 --- a/src/main/java/org/schema/ConsumeAction.java +++ b/src/main/java/org/schema/ConsumeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of ingesting information/resources/food. */ @@ -31,7 +35,7 @@ public Offer getExpectsAcceptanceOf() { /** * Builder for {@link ConsumeAction} */ - public static final class ConsumeActionThingBuilder implements Builder { + static final class ConsumeActionThingBuilder implements Builder { /** * Creates new {@link ConsumeAction} instance. */ @@ -41,20 +45,20 @@ public ConsumeAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -62,13 +66,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -76,7 +80,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -84,7 +88,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -93,67 +97,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -187,7 +191,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -222,7 +226,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -263,38 +267,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -319,32 +323,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ConsumeAction(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) { diff --git a/src/main/java/org/schema/ContactPage.java b/src/main/java/org/schema/ContactPage.java index 1331eb41..d4da5ab4 100644 --- a/src/main/java/org/schema/ContactPage.java +++ b/src/main/java/org/schema/ContactPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web page type: Contact page. */ @@ -25,7 +29,7 @@ public class ContactPage extends WebPage { /** * Builder for {@link ContactPage} */ - public static final class ContactPageThingBuilder implements Builder { + static final class ContactPageThingBuilder implements Builder { /** * Creates new {@link ContactPage} instance. */ @@ -35,7 +39,7 @@ public ContactPage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/ContactPoint.java b/src/main/java/org/schema/ContactPoint.java index 9fef03de..4088e34c 100644 --- a/src/main/java/org/schema/ContactPoint.java +++ b/src/main/java/org/schema/ContactPoint.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A contact point—for example, a Customer Complaints department. */ @@ -79,7 +83,7 @@ public String getTelephone() { /** * Builder for {@link ContactPoint} */ - public static final class ContactPointThingBuilder implements Builder { + static final class ContactPointThingBuilder implements Builder { /** * Creates new {@link ContactPoint} instance. */ @@ -89,80 +93,80 @@ public ContactPoint build() { /** * The location served by this contact point (e.g., a phone number intended for Europeans vs. North Americans or only within the United States). */ - public Builder areaServed(AdministrativeArea administrativeArea) { + @NotNull public Builder areaServed(AdministrativeArea administrativeArea) { this.areaServed = administrativeArea; return this; } /** * The location served by this contact point (e.g., a phone number intended for Europeans vs. North Americans or only within the United States). */ - public Builder areaServed(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder areaServed(AdministrativeArea.Builder administrativeArea) { return this.areaServed(administrativeArea.build()); } /** * A language someone may use with the item. */ - public Builder availableLanguage(Language language) { + @NotNull public Builder availableLanguage(Language language) { this.availableLanguage = language; return this; } /** * A language someone may use with the item. */ - public Builder availableLanguage(Language.Builder language) { + @NotNull public Builder availableLanguage(Language.Builder language) { return this.availableLanguage(language.build()); } /** * An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers). */ - public Builder contactOption(ContactPointOption contactPointOption) { + @NotNull public Builder contactOption(ContactPointOption contactPointOption) { this.contactOption = contactPointOption; return this; } /** * An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers). */ - public Builder contactOption(ContactPointOption.Builder contactPointOption) { + @NotNull public Builder contactOption(ContactPointOption.Builder contactPointOption) { return this.contactOption(contactPointOption.build()); } /** * A person or organization can have different contact points, for different purposes. For example, a sales contact point, a PR contact point and so on. This property is used to specify the kind of contact point. */ - public Builder contactType(String contactType) { + @NotNull public Builder contactType(String contactType) { this.contactType = contactType; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The hours during which this contact point is available. */ - public Builder hoursAvailable(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder hoursAvailable(OpeningHoursSpecification openingHoursSpecification) { this.hoursAvailable = openingHoursSpecification; return this; } /** * The hours during which this contact point is available. */ - public Builder hoursAvailable(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder hoursAvailable(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.hoursAvailable(openingHoursSpecification.build()); } /** * The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones"). */ - public Builder productSupported(Product product) { + @NotNull public Builder productSupported(Product product) { if (this.productSupported == null) this.productSupported = new ProductOrString(); this.productSupported.setProduct(product); return this; @@ -170,13 +174,13 @@ public Builder productSupported(Product product) { /** * The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones"). */ - public Builder productSupported(Product.Builder product) { + @NotNull public Builder productSupported(Product.Builder product) { return this.productSupported(product.build()); } /** * The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones"). */ - public Builder productSupported(String productSupported) { + @NotNull public Builder productSupported(String productSupported) { if (this.productSupported == null) this.productSupported = new ProductOrString(); this.productSupported.setString(productSupported); return this; @@ -184,28 +188,28 @@ public Builder productSupported(String productSupported) { /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -239,7 +243,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -274,7 +278,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -307,7 +311,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -315,38 +319,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -373,33 +377,33 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder areaServed(AdministrativeArea administrativeArea); - Builder areaServed(AdministrativeArea.Builder administrativeArea); - Builder availableLanguage(Language language); - Builder availableLanguage(Language.Builder language); - Builder contactOption(ContactPointOption contactPointOption); - Builder contactOption(ContactPointOption.Builder contactPointOption); - Builder contactType(String contactType); - Builder email(String email); - Builder faxNumber(String faxNumber); - Builder hoursAvailable(OpeningHoursSpecification openingHoursSpecification); - Builder hoursAvailable(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder productSupported(Product product); - Builder productSupported(Product.Builder product); - Builder productSupported(String productSupported); - Builder telephone(String telephone); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder areaServed(AdministrativeArea administrativeArea); + @NotNull Builder areaServed(AdministrativeArea.Builder administrativeArea); + @NotNull Builder availableLanguage(Language language); + @NotNull Builder availableLanguage(Language.Builder language); + @NotNull Builder contactOption(ContactPointOption contactPointOption); + @NotNull Builder contactOption(ContactPointOption.Builder contactPointOption); + @NotNull Builder contactType(String contactType); + @NotNull Builder email(String email); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder hoursAvailable(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder hoursAvailable(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder productSupported(Product product); + @NotNull Builder productSupported(Product.Builder product); + @NotNull Builder productSupported(String productSupported); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ContactPoint(AdministrativeArea areaServed, Language availableLanguage, ContactPointOption contactOption, String contactType, String email, String faxNumber, OpeningHoursSpecification hoursAvailable, ProductOrString productSupported, String telephone, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ContactPointOption.java b/src/main/java/org/schema/ContactPointOption.java index 211d54c5..1e553be4 100644 --- a/src/main/java/org/schema/ContactPointOption.java +++ b/src/main/java/org/schema/ContactPointOption.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Enumerated options related to a ContactPoint. */ @@ -25,7 +29,7 @@ public class ContactPointOption extends Enumeration { /** * Builder for {@link ContactPointOption} */ - public static final class ContactPointOptionThingBuilder implements Builder { + static final class ContactPointOptionThingBuilder implements Builder { /** * Creates new {@link ContactPointOption} instance. */ @@ -35,7 +39,7 @@ public ContactPointOption build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ContactPointOption(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ContactPointOrPlace.java b/src/main/java/org/schema/ContactPointOrPlace.java index 8993fa95..3c19eb25 100644 --- a/src/main/java/org/schema/ContactPointOrPlace.java +++ b/src/main/java/org/schema/ContactPointOrPlace.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ContactPointOrPlace { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myContactPoint != null) return myContactPoint; if (myPlace != null) return myPlace; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setContactPoint(ContactPoint contactPoint) { clear(); myContactPoint = contactPoint; } public ContactPoint getContactPoint() { return myContactPoint; } - private ContactPoint myContactPoint; public void setPlace(Place place) { clear(); myPlace = place; } public Place getPlace() { return myPlace; } + private ContactPoint myContactPoint; private Place myPlace; private void clear() { myContactPoint = null; diff --git a/src/main/java/org/schema/Continent.java b/src/main/java/org/schema/Continent.java index 53402d13..43ae82fa 100644 --- a/src/main/java/org/schema/Continent.java +++ b/src/main/java/org/schema/Continent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * One of the continents (for example, Europe or Africa). */ @@ -25,7 +29,7 @@ public class Continent extends Landform { /** * Builder for {@link Continent} */ - public static final class ContinentThingBuilder implements Builder { + static final class ContinentThingBuilder implements Builder { /** * Creates new {@link Continent} instance. */ @@ -35,66 +39,66 @@ public Continent build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ControlAction.java b/src/main/java/org/schema/ControlAction.java index 83ebfb04..f932fbe7 100644 --- a/src/main/java/org/schema/ControlAction.java +++ b/src/main/java/org/schema/ControlAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent controls a device or application. */ @@ -25,7 +29,7 @@ public class ControlAction extends Action { /** * Builder for {@link ControlAction} */ - public static final class ControlActionThingBuilder implements Builder { + static final class ControlActionThingBuilder implements Builder { /** * Creates new {@link ControlAction} instance. */ @@ -35,7 +39,7 @@ public ControlAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ConvenienceStore.java b/src/main/java/org/schema/ConvenienceStore.java index d7e51797..a0e096bc 100644 --- a/src/main/java/org/schema/ConvenienceStore.java +++ b/src/main/java/org/schema/ConvenienceStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A convenience store. */ @@ -25,7 +29,7 @@ public class ConvenienceStore extends Store { /** * Builder for {@link ConvenienceStore} */ - public static final class ConvenienceStoreThingBuilder implements Builder { + static final class ConvenienceStoreThingBuilder implements Builder { /** * Creates new {@link ConvenienceStore} instance. */ @@ -35,107 +39,107 @@ public ConvenienceStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CookAction.java b/src/main/java/org/schema/CookAction.java index c3bff0cc..c29a1ed4 100644 --- a/src/main/java/org/schema/CookAction.java +++ b/src/main/java/org/schema/CookAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of producing/preparing food. */ @@ -43,7 +47,7 @@ public Recipe getRecipe() { /** * Builder for {@link CookAction} */ - public static final class CookActionThingBuilder implements Builder { + static final class CookActionThingBuilder implements Builder { /** * Creates new {@link CookAction} instance. */ @@ -53,7 +57,7 @@ public CookAction build() { /** * A sub property of location. The specific food establishment where the action occurred. */ - public Builder foodEstablishment(FoodEstablishment foodEstablishment) { + @NotNull public Builder foodEstablishment(FoodEstablishment foodEstablishment) { if (this.foodEstablishment == null) this.foodEstablishment = new FoodEstablishmentOrPlace(); this.foodEstablishment.setFoodEstablishment(foodEstablishment); return this; @@ -61,13 +65,13 @@ public Builder foodEstablishment(FoodEstablishment foodEstablishment) { /** * A sub property of location. The specific food establishment where the action occurred. */ - public Builder foodEstablishment(FoodEstablishment.Builder foodEstablishment) { + @NotNull public Builder foodEstablishment(FoodEstablishment.Builder foodEstablishment) { return this.foodEstablishment(foodEstablishment.build()); } /** * A sub property of location. The specific food establishment where the action occurred. */ - public Builder foodEstablishment(Place place) { + @NotNull public Builder foodEstablishment(Place place) { if (this.foodEstablishment == null) this.foodEstablishment = new FoodEstablishmentOrPlace(); this.foodEstablishment.setPlace(place); return this; @@ -75,39 +79,39 @@ public Builder foodEstablishment(Place place) { /** * A sub property of location. The specific food establishment where the action occurred. */ - public Builder foodEstablishment(Place.Builder place) { + @NotNull public Builder foodEstablishment(Place.Builder place) { return this.foodEstablishment(place.build()); } /** * A sub property of location. The specific food event where the action occurred. */ - public Builder foodEvent(FoodEvent foodEvent) { + @NotNull public Builder foodEvent(FoodEvent foodEvent) { this.foodEvent = foodEvent; return this; } /** * A sub property of location. The specific food event where the action occurred. */ - public Builder foodEvent(FoodEvent.Builder foodEvent) { + @NotNull public Builder foodEvent(FoodEvent.Builder foodEvent) { return this.foodEvent(foodEvent.build()); } /** * A sub property of instrument. The recipe/instructions used to perform the action. */ - public Builder recipe(Recipe recipe) { + @NotNull public Builder recipe(Recipe recipe) { this.recipe = recipe; return this; } /** * A sub property of instrument. The recipe/instructions used to perform the action. */ - public Builder recipe(Recipe.Builder recipe) { + @NotNull public Builder recipe(Recipe.Builder recipe) { return this.recipe(recipe.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -115,13 +119,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -129,7 +133,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -137,7 +141,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -146,67 +150,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -240,7 +244,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -275,7 +279,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -308,7 +312,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -316,38 +320,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -374,38 +378,38 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder foodEstablishment(FoodEstablishment foodEstablishment); - Builder foodEstablishment(FoodEstablishment.Builder foodEstablishment); - Builder foodEstablishment(Place place); - Builder foodEstablishment(Place.Builder place); - Builder foodEvent(FoodEvent foodEvent); - Builder foodEvent(FoodEvent.Builder foodEvent); - Builder recipe(Recipe recipe); - Builder recipe(Recipe.Builder recipe); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder foodEstablishment(FoodEstablishment foodEstablishment); + @NotNull Builder foodEstablishment(FoodEstablishment.Builder foodEstablishment); + @NotNull Builder foodEstablishment(Place place); + @NotNull Builder foodEstablishment(Place.Builder place); + @NotNull Builder foodEvent(FoodEvent foodEvent); + @NotNull Builder foodEvent(FoodEvent.Builder foodEvent); + @NotNull Builder recipe(Recipe recipe); + @NotNull Builder recipe(Recipe.Builder recipe); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected CookAction(FoodEstablishmentOrPlace foodEstablishment, FoodEvent foodEvent, Recipe recipe, 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) { diff --git a/src/main/java/org/schema/Corporation.java b/src/main/java/org/schema/Corporation.java index 7e9d908d..822c116b 100644 --- a/src/main/java/org/schema/Corporation.java +++ b/src/main/java/org/schema/Corporation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Organization: A business corporation. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews @@ -32,7 +36,7 @@ public String getTickerSymbol() { /** * Builder for {@link Corporation} */ - public static final class CorporationThingBuilder implements Builder { + static final class CorporationThingBuilder implements Builder { /** * Creates new {@link Corporation} instance. */ @@ -42,47 +46,47 @@ public Corporation build() { /** * The exchange traded instrument associated with a Corporation object. The tickerSymbol is expressed as an exchange and an instrument name separated by a space character. For the exchange component of the tickerSymbol attribute, we reccommend using the controlled vocaulary of Market Identifier Codes (MIC) specified in ISO15022. */ - public Builder tickerSymbol(String tickerSymbol) { + @NotNull public Builder tickerSymbol(String tickerSymbol) { this.tickerSymbol = tickerSymbol; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -90,13 +94,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -104,147 +108,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -252,13 +256,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -266,20 +270,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -287,13 +291,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -301,13 +305,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -315,13 +319,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -329,33 +333,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -363,13 +367,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -377,100 +381,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -504,7 +508,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -539,7 +543,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -572,7 +576,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -580,38 +584,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -662,79 +666,79 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder tickerSymbol(String tickerSymbol); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder tickerSymbol(String tickerSymbol); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Corporation(String tickerSymbol, 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) { diff --git a/src/main/java/org/schema/Country.java b/src/main/java/org/schema/Country.java index 46fbdb30..f4c9dde4 100644 --- a/src/main/java/org/schema/Country.java +++ b/src/main/java/org/schema/Country.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A country. */ @@ -25,7 +29,7 @@ public class Country extends AdministrativeArea { /** * Builder for {@link Country} */ - public static final class CountryThingBuilder implements Builder { + static final class CountryThingBuilder implements Builder { /** * Creates new {@link Country} instance. */ @@ -35,66 +39,66 @@ public Country build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Courthouse.java b/src/main/java/org/schema/Courthouse.java index 089e4297..0f1ad5ec 100644 --- a/src/main/java/org/schema/Courthouse.java +++ b/src/main/java/org/schema/Courthouse.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A courthouse. */ @@ -25,7 +29,7 @@ public class Courthouse extends GovernmentBuilding { /** * Builder for {@link Courthouse} */ - public static final class CourthouseThingBuilder implements Builder { + static final class CourthouseThingBuilder implements Builder { /** * Creates new {@link Courthouse} instance. */ @@ -35,73 +39,73 @@ public Courthouse build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CreateAction.java b/src/main/java/org/schema/CreateAction.java index 004b8605..72349d30 100644 --- a/src/main/java/org/schema/CreateAction.java +++ b/src/main/java/org/schema/CreateAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of deliberately creating/producing/generating/building a result out of the agent. */ @@ -25,7 +29,7 @@ public class CreateAction extends Action { /** * Builder for {@link CreateAction} */ - public static final class CreateActionThingBuilder implements Builder { + static final class CreateActionThingBuilder implements Builder { /** * Creates new {@link CreateAction} instance. */ @@ -35,7 +39,7 @@ public CreateAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CreativeWork.java b/src/main/java/org/schema/CreativeWork.java index a5ea8081..09dc9cc8 100644 --- a/src/main/java/org/schema/CreativeWork.java +++ b/src/main/java/org/schema/CreativeWork.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The most generic kind of creative work, including books, movies, photographs, software programs, etc. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews @@ -158,21 +162,21 @@ public OrganizationOrPerson getCreator() { /** * The date on which the CreativeWork was created. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDateCreated() { return myDateCreated; } /** * The date on which the CreativeWork was most recently modified. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDateModified() { return myDateModified; } /** * Date of first broadcast/publication. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDatePublished() { return myDatePublished; } @@ -365,7 +369,7 @@ public OrganizationOrPerson getProvider() { /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Integer getCommentCount() { + public int getCommentCount() { return myCommentCount; } /** @@ -407,7 +411,7 @@ public PublicationEvent getReleasedEvent() { /** * Builder for {@link CreativeWork} */ - public static final class CreativeWorkThingBuilder implements Builder { + static final class CreativeWorkThingBuilder implements Builder { /** * Creates new {@link CreativeWork} instance. */ @@ -417,127 +421,127 @@ public CreativeWork build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -545,13 +549,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -559,20 +563,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -580,13 +584,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -594,40 +598,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -635,13 +639,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -649,13 +653,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -663,13 +667,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -677,21 +681,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -699,7 +703,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -707,7 +711,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -715,7 +719,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -723,7 +727,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -731,13 +735,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -745,101 +749,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -847,13 +851,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -861,35 +865,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -897,13 +901,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -911,53 +915,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -965,13 +969,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -979,127 +983,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -1107,7 +1111,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -1115,7 +1119,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -1123,7 +1127,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -1131,20 +1135,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -1152,13 +1156,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -1166,66 +1170,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1233,13 +1237,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1247,40 +1251,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1314,7 +1318,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1349,7 +1353,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1382,7 +1386,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1390,38 +1394,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1484,7 +1488,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1502,144 +1506,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected CreativeWork(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) { + protected CreativeWork(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, int 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(additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); mySchemaVersion = schemaVersion; myAbout = about; @@ -1761,7 +1765,7 @@ protected CreativeWork(String schemaVersion, Thing about, String accessibilityAP private Number myVersion; private VideoObject myVideo; private OrganizationOrPerson myProvider; - private Integer myCommentCount; + private int myCommentCount; private HasPart myHasPart; private CreativeWork myWorkExample; private CreativeWork myExampleOfWork; diff --git a/src/main/java/org/schema/CreativeWorkOrString.java b/src/main/java/org/schema/CreativeWorkOrString.java index 9545bc1f..c221073c 100644 --- a/src/main/java/org/schema/CreativeWorkOrString.java +++ b/src/main/java/org/schema/CreativeWorkOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class CreativeWorkOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myCreativeWork != null) return myCreativeWork; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setCreativeWork(CreativeWork creativeWork) { clear(); myCreativeWork = creativeWork; } public CreativeWork getCreativeWork() { return myCreativeWork; } - private CreativeWork myCreativeWork; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private CreativeWork myCreativeWork; private String myString; private void clear() { myCreativeWork = null; diff --git a/src/main/java/org/schema/CreativeWorkSeason.java b/src/main/java/org/schema/CreativeWorkSeason.java index cccdbcff..b8f693b5 100644 --- a/src/main/java/org/schema/CreativeWorkSeason.java +++ b/src/main/java/org/schema/CreativeWorkSeason.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A media season e.g. tv, radio, video game etc. */ @@ -37,7 +41,7 @@ public Person getDirector() { /** * The end date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getEndDate() { return myEndDate; } @@ -50,7 +54,7 @@ public HasPart getEpisode() { /** * The number of episodes in this season or series. */ - public Integer getNumberOfEpisodes() { + public int getNumberOfEpisodes() { return myNumberOfEpisodes; } /** @@ -68,13 +72,13 @@ public Organization getProductionCompany() { /** * Position of the season within an ordered group of seasons. */ - public IntegerOrString getSeasonNumber() { + public StringOrInt getSeasonNumber() { return mySeasonNumber; } /** * The start date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getStartDate() { return myStartDate; } @@ -87,7 +91,7 @@ public VideoObject getTrailer() { /** * Builder for {@link CreativeWorkSeason} */ - public static final class CreativeWorkSeasonThingBuilder implements Builder { + static final class CreativeWorkSeasonThingBuilder implements Builder { /** * Creates new {@link CreativeWorkSeason} instance. */ @@ -97,230 +101,230 @@ public CreativeWorkSeason build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An episode of a tv, radio or game media within a series or season. */ - public Builder episode(HasPart hasPart) { + @NotNull public Builder episode(HasPart hasPart) { this.episode = hasPart; return this; } /** * The number of episodes in this season or series. */ - public Builder numberOfEpisodes(Integer integer) { - this.numberOfEpisodes = integer; + @NotNull public Builder numberOfEpisodes(int numberOfEpisodes) { + this.numberOfEpisodes = numberOfEpisodes; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * Position of the season within an ordered group of seasons. */ - public Builder seasonNumber(Integer integer) { - if (this.seasonNumber == null) this.seasonNumber = new IntegerOrString(); - this.seasonNumber.setInteger(integer); + @NotNull public Builder seasonNumber(String seasonNumber) { + if (this.seasonNumber == null) this.seasonNumber = new StringOrInt(); + this.seasonNumber.setString(seasonNumber); return this; } /** * Position of the season within an ordered group of seasons. */ - public Builder seasonNumber(String seasonNumber) { - if (this.seasonNumber == null) this.seasonNumber = new IntegerOrString(); - this.seasonNumber.setString(seasonNumber); + @NotNull public Builder seasonNumber(int seasonNumber) { + if (this.seasonNumber == null) this.seasonNumber = new StringOrInt(); + this.seasonNumber.setInt(seasonNumber); return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -328,13 +332,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -342,20 +346,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -363,13 +367,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -377,40 +381,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -418,13 +422,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -432,13 +436,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -446,13 +450,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -460,21 +464,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -482,7 +486,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -490,7 +494,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -498,7 +502,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -506,7 +510,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -514,13 +518,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -528,101 +532,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -630,13 +634,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -644,35 +648,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -680,13 +684,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -694,53 +698,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -748,13 +752,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -762,127 +766,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -890,7 +894,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -898,7 +902,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -906,7 +910,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -914,20 +918,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -935,13 +939,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -949,66 +953,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1016,13 +1020,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1030,40 +1034,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1097,7 +1101,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1132,7 +1136,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1165,7 +1169,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1173,38 +1177,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1215,10 +1219,10 @@ public Builder id(long id) { private Person director; private java.util.Date endDate; private HasPart episode; - private Integer numberOfEpisodes; + private int numberOfEpisodes; private IsPartOf partOfSeries; private Organization productionCompany; - private IntegerOrString seasonNumber; + private StringOrInt seasonNumber; private java.util.Date startDate; private VideoObject trailer; private String schemaVersion; @@ -1277,7 +1281,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1295,159 +1299,159 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder endDate(java.util.Date date); - Builder episode(HasPart hasPart); - Builder numberOfEpisodes(Integer integer); - Builder partOfSeries(IsPartOf isPartOf); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder seasonNumber(Integer integer); - Builder seasonNumber(String seasonNumber); - Builder startDate(java.util.Date date); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder episode(HasPart hasPart); + @NotNull Builder numberOfEpisodes(int numberOfEpisodes); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder seasonNumber(String seasonNumber); + @NotNull Builder seasonNumber(int seasonNumber); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected CreativeWorkSeason(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) { + protected CreativeWorkSeason(Person actor, Person director, java.util.Date endDate, HasPart episode, int numberOfEpisodes, IsPartOf partOfSeries, Organization productionCompany, StringOrInt 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, int 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); myActor = actor; myDirector = director; @@ -1464,10 +1468,10 @@ protected CreativeWorkSeason(Person actor, Person director, java.util.Date endDa private Person myDirector; private java.util.Date myEndDate; private HasPart myEpisode; - private Integer myNumberOfEpisodes; + private int myNumberOfEpisodes; private IsPartOf myPartOfSeries; private Organization myProductionCompany; - private IntegerOrString mySeasonNumber; + private StringOrInt mySeasonNumber; private java.util.Date myStartDate; private VideoObject myTrailer; } diff --git a/src/main/java/org/schema/CreativeWorkSeries.java b/src/main/java/org/schema/CreativeWorkSeries.java index 897333e7..41ed4ea3 100644 --- a/src/main/java/org/schema/CreativeWorkSeries.java +++ b/src/main/java/org/schema/CreativeWorkSeries.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * * A CreativeWorkSeries in schema.org is a group of related items, typically but not necessarily of the same kind. @@ -47,21 +51,21 @@ public class CreativeWorkSeries extends CreativeWork { /** * The end date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getEndDate() { return myEndDate; } /** * The start date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getStartDate() { return myStartDate; } /** * Builder for {@link CreativeWorkSeries} */ - public static final class CreativeWorkSeriesThingBuilder implements Builder { + static final class CreativeWorkSeriesThingBuilder implements Builder { /** * Creates new {@link CreativeWorkSeries} instance. */ @@ -71,141 +75,141 @@ public CreativeWorkSeries build() { /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -213,13 +217,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -227,20 +231,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -248,13 +252,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -262,40 +266,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -303,13 +307,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -317,13 +321,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -331,13 +335,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -345,21 +349,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -367,7 +371,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -375,7 +379,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -383,7 +387,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -391,7 +395,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -399,13 +403,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -413,101 +417,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -515,13 +519,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -529,35 +533,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -565,13 +569,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -579,53 +583,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -633,13 +637,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -647,127 +651,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -775,7 +779,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -783,7 +787,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -791,7 +795,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -799,20 +803,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -820,13 +824,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -834,66 +838,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -901,13 +905,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -915,40 +919,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -982,7 +986,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1017,7 +1021,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1050,7 +1054,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1058,38 +1062,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1154,7 +1158,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1172,146 +1176,146 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder endDate(java.util.Date date); - Builder startDate(java.util.Date date); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected CreativeWorkSeries(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) { + protected CreativeWorkSeries(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, int 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); myEndDate = endDate; myStartDate = startDate; diff --git a/src/main/java/org/schema/CreditCard.java b/src/main/java/org/schema/CreditCard.java index ec97213b..3e5c3170 100644 --- a/src/main/java/org/schema/CreditCard.java +++ b/src/main/java/org/schema/CreditCard.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A credit or debit card type as a standardized procedure for transferring the monetary amount for a purchase. *
@@ -36,7 +40,7 @@ public class CreditCard extends PaymentMethod { /** * Builder for {@link CreditCard} */ - public static final class CreditCardThingBuilder implements Builder { + static final class CreditCardThingBuilder implements Builder { /** * Creates new {@link CreditCard} instance. */ @@ -46,7 +50,7 @@ public CreditCard build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -54,13 +58,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -68,27 +72,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -122,7 +126,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -157,7 +161,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -190,7 +194,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -198,38 +202,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -248,22 +252,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected CreditCard(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Crematorium.java b/src/main/java/org/schema/Crematorium.java index 413254d5..31b3717d 100644 --- a/src/main/java/org/schema/Crematorium.java +++ b/src/main/java/org/schema/Crematorium.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A crematorium. */ @@ -25,7 +29,7 @@ public class Crematorium extends CivicStructure { /** * Builder for {@link Crematorium} */ - public static final class CrematoriumThingBuilder implements Builder { + static final class CrematoriumThingBuilder implements Builder { /** * Creates new {@link Crematorium} instance. */ @@ -35,73 +39,73 @@ public Crematorium build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/CrossSectional.java b/src/main/java/org/schema/CrossSectional.java index b0cf5ff5..a49651ff 100644 --- a/src/main/java/org/schema/CrossSectional.java +++ b/src/main/java/org/schema/CrossSectional.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Studies carried out on pre-existing data (usually from 'snapshot' surveys), such as that collected by the Census Bureau. Sometimes called Prevalence Studies. */ @@ -25,7 +29,7 @@ public class CrossSectional { /** * Builder for {@link CrossSectional} */ - public static final class CrossSectionalThingBuilder implements Builder { + static final class CrossSectionalThingBuilder implements Builder { /** * Creates new {@link CrossSectional} instance. */ @@ -34,7 +38,7 @@ public CrossSectional build() { } } public interface Builder extends ThingBuilder { - + } protected CrossSectional() { diff --git a/src/main/java/org/schema/DDxElement.java b/src/main/java/org/schema/DDxElement.java index a25a8737..0d4a0716 100644 --- a/src/main/java/org/schema/DDxElement.java +++ b/src/main/java/org/schema/DDxElement.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An alternative, closely-related condition typically considered later in the differential diagnosis process along with the signs that are used to distinguish it. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -38,7 +42,7 @@ public MedicalSignOrSymptom getDistinguishingSign() { /** * Builder for {@link DDxElement} */ - public static final class DDxElementThingBuilder implements Builder { + static final class DDxElementThingBuilder implements Builder { /** * Creates new {@link DDxElement} instance. */ @@ -48,125 +52,125 @@ public DDxElement build() { /** * One or more alternative conditions considered in the differential diagnosis process. */ - public Builder diagnosis(MedicalCondition medicalCondition) { + @NotNull public Builder diagnosis(MedicalCondition medicalCondition) { this.diagnosis = medicalCondition; return this; } /** * One or more alternative conditions considered in the differential diagnosis process. */ - public Builder diagnosis(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder diagnosis(MedicalCondition.Builder medicalCondition) { return this.diagnosis(medicalCondition.build()); } /** * One of a set of signs and symptoms that can be used to distinguish this diagnosis from others in the differential diagnosis. */ - public Builder distinguishingSign(MedicalSignOrSymptom medicalSignOrSymptom) { + @NotNull public Builder distinguishingSign(MedicalSignOrSymptom medicalSignOrSymptom) { this.distinguishingSign = medicalSignOrSymptom; return this; } /** * One of a set of signs and symptoms that can be used to distinguish this diagnosis from others in the differential diagnosis. */ - public Builder distinguishingSign(MedicalSignOrSymptom.Builder medicalSignOrSymptom) { + @NotNull public Builder distinguishingSign(MedicalSignOrSymptom.Builder medicalSignOrSymptom) { return this.distinguishingSign(medicalSignOrSymptom.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -200,7 +204,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -235,7 +239,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -268,7 +272,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -276,38 +280,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -333,34 +337,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder diagnosis(MedicalCondition medicalCondition); - Builder diagnosis(MedicalCondition.Builder medicalCondition); - Builder distinguishingSign(MedicalSignOrSymptom medicalSignOrSymptom); - Builder distinguishingSign(MedicalSignOrSymptom.Builder medicalSignOrSymptom); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder diagnosis(MedicalCondition medicalCondition); + @NotNull Builder diagnosis(MedicalCondition.Builder medicalCondition); + @NotNull Builder distinguishingSign(MedicalSignOrSymptom medicalSignOrSymptom); + @NotNull Builder distinguishingSign(MedicalSignOrSymptom.Builder medicalSignOrSymptom); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DDxElement(MedicalCondition diagnosis, MedicalSignOrSymptom distinguishingSign, 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) { diff --git a/src/main/java/org/schema/DJMixAlbum.java b/src/main/java/org/schema/DJMixAlbum.java index 04673d39..2ac5e48a 100644 --- a/src/main/java/org/schema/DJMixAlbum.java +++ b/src/main/java/org/schema/DJMixAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * DJMixAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class DJMixAlbum { /** * Builder for {@link DJMixAlbum} */ - public static final class DJMixAlbumThingBuilder implements Builder { + static final class DJMixAlbumThingBuilder implements Builder { /** * Creates new {@link DJMixAlbum} instance. */ @@ -35,7 +39,7 @@ public DJMixAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected DJMixAlbum() { diff --git a/src/main/java/org/schema/DVDFormat.java b/src/main/java/org/schema/DVDFormat.java index d836fb09..d1f5128f 100644 --- a/src/main/java/org/schema/DVDFormat.java +++ b/src/main/java/org/schema/DVDFormat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * DVDFormat. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class DVDFormat { /** * Builder for {@link DVDFormat} */ - public static final class DVDFormatThingBuilder implements Builder { + static final class DVDFormatThingBuilder implements Builder { /** * Creates new {@link DVDFormat} instance. */ @@ -35,7 +39,7 @@ public DVDFormat build() { } } public interface Builder extends ThingBuilder { - + } protected DVDFormat() { diff --git a/src/main/java/org/schema/DamagedCondition.java b/src/main/java/org/schema/DamagedCondition.java index d0c12cd4..5e95e0e0 100644 --- a/src/main/java/org/schema/DamagedCondition.java +++ b/src/main/java/org/schema/DamagedCondition.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is damaged. */ @@ -25,7 +29,7 @@ public class DamagedCondition { /** * Builder for {@link DamagedCondition} */ - public static final class DamagedConditionThingBuilder implements Builder { + static final class DamagedConditionThingBuilder implements Builder { /** * Creates new {@link DamagedCondition} instance. */ @@ -34,7 +38,7 @@ public DamagedCondition build() { } } public interface Builder extends ThingBuilder { - + } protected DamagedCondition() { diff --git a/src/main/java/org/schema/DanceEvent.java b/src/main/java/org/schema/DanceEvent.java index 8ddfb16c..0aa81a42 100644 --- a/src/main/java/org/schema/DanceEvent.java +++ b/src/main/java/org/schema/DanceEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: A social dance. */ @@ -25,7 +29,7 @@ public class DanceEvent extends Event { /** * Builder for {@link DanceEvent} */ - public static final class DanceEventThingBuilder implements Builder { + static final class DanceEventThingBuilder implements Builder { /** * Creates new {@link DanceEvent} instance. */ @@ -35,20 +39,20 @@ public DanceEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DanceGroup.java b/src/main/java/org/schema/DanceGroup.java index f3e01372..193edeba 100644 --- a/src/main/java/org/schema/DanceGroup.java +++ b/src/main/java/org/schema/DanceGroup.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A dance group—for example, the Alvin Ailey Dance Theater or Riverdance. */ @@ -25,7 +29,7 @@ public class DanceGroup extends PerformingGroup { /** * Builder for {@link DanceGroup} */ - public static final class DanceGroupThingBuilder implements Builder { + static final class DanceGroupThingBuilder implements Builder { /** * Creates new {@link DanceGroup} instance. */ @@ -35,40 +39,40 @@ public DanceGroup build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -76,13 +80,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -90,147 +94,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -238,13 +242,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -252,20 +256,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -287,13 +291,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -301,13 +305,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -315,33 +319,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -349,13 +353,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -363,100 +367,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -490,7 +494,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -525,7 +529,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -558,7 +562,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -566,38 +570,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -647,78 +651,78 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DataCatalog.java b/src/main/java/org/schema/DataCatalog.java index 7cbd91a5..240e4177 100644 --- a/src/main/java/org/schema/DataCatalog.java +++ b/src/main/java/org/schema/DataCatalog.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A collection of datasets. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_DatasetClass @@ -33,7 +37,7 @@ public Dataset getDataset() { /** * Builder for {@link DataCatalog} */ - public static final class DataCatalogThingBuilder implements Builder { + static final class DataCatalogThingBuilder implements Builder { /** * Creates new {@link DataCatalog} instance. */ @@ -43,140 +47,140 @@ public DataCatalog build() { /** * A dataset contained in a catalog. */ - public Builder dataset(Dataset dataset) { + @NotNull public Builder dataset(Dataset dataset) { this.dataset = dataset; return this; } /** * A dataset contained in a catalog. */ - public Builder dataset(Dataset.Builder dataset) { + @NotNull public Builder dataset(Dataset.Builder dataset) { return this.dataset(dataset.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -184,13 +188,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -198,20 +202,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -219,13 +223,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -233,40 +237,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -274,13 +278,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -288,13 +292,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -302,13 +306,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -316,21 +320,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -338,7 +342,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -346,7 +350,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -354,7 +358,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -362,7 +366,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -370,13 +374,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -384,101 +388,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -486,13 +490,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -500,35 +504,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -536,13 +540,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -550,53 +554,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -604,13 +608,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -618,127 +622,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -746,7 +750,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -754,7 +758,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -762,7 +766,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -770,20 +774,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -791,13 +795,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -805,66 +809,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -872,13 +876,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -886,40 +890,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -953,7 +957,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -988,7 +992,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1021,7 +1025,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1029,38 +1033,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1124,7 +1128,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1142,146 +1146,146 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder dataset(Dataset dataset); - Builder dataset(Dataset.Builder dataset); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder dataset(Dataset dataset); + @NotNull Builder dataset(Dataset.Builder dataset); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected DataCatalog(Dataset dataset, 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) { + protected DataCatalog(Dataset dataset, 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, int 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); myDataset = dataset; } diff --git a/src/main/java/org/schema/DataDownload.java b/src/main/java/org/schema/DataDownload.java index fa32e45c..3073458a 100644 --- a/src/main/java/org/schema/DataDownload.java +++ b/src/main/java/org/schema/DataDownload.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A dataset in downloadable form. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_DatasetClass @@ -27,7 +31,7 @@ public class DataDownload extends MediaObject { /** * Builder for {@link DataDownload} */ - public static final class DataDownloadThingBuilder implements Builder { + static final class DataDownloadThingBuilder implements Builder { /** * Creates new {@link DataDownload} instance. */ @@ -37,88 +41,88 @@ public DataDownload build() { /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle newsArticle) { this.associatedArticle = newsArticle; return this; } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle.Builder newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle.Builder newsArticle) { return this.associatedArticle(newsArticle.build()); } /** * The bitrate of the media object. */ - public Builder bitrate(String bitrate) { + @NotNull public Builder bitrate(String bitrate) { this.bitrate = bitrate; return this; } /** * File size in (mega/kilo) bytes. */ - public Builder contentSize(String contentSize) { + @NotNull public Builder contentSize(String contentSize) { this.contentSize = contentSize; return this; } /** * Actual bytes of the media object, for example the image file or video file. */ - public Builder contentUrl(String contentUrl) { + @NotNull public Builder contentUrl(String contentUrl) { this.contentUrl = contentUrl; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * A URL pointing to a player for a specific video. In general, this is the information in the src element of an embed tag and should not be the same as the content of the loc tag. */ - public Builder embedUrl(String embedUrl) { + @NotNull public Builder embedUrl(String embedUrl) { this.embedUrl = embedUrl; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork creativeWork) { this.encodesCreativeWork = creativeWork; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { return this.encodesCreativeWork(creativeWork.build()); } /** * mp3, mpeg4, etc. */ - public Builder encodingFormat(String encodingFormat) { + @NotNull public Builder encodingFormat(String encodingFormat) { this.encodingFormat = encodingFormat; return this; } /** * Date the content expires and is no longer useful or available. Useful for videos. */ - public Builder expires(java.util.Date date) { + @NotNull public Builder expires(java.util.Date date) { this.expires = date; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -126,13 +130,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -140,60 +144,60 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * Player type required—for example, Flash or Silverlight. */ - public Builder playerType(String playerType) { + @NotNull public Builder playerType(String playerType) { this.playerType = playerType; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place place) { + @NotNull public Builder regionsAllowed(Place place) { this.regionsAllowed = place; return this; } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place.Builder place) { + @NotNull public Builder regionsAllowed(Place.Builder place) { return this.regionsAllowed(place.build()); } /** * Indicates if use of the media require a subscription (either paid or free). Allowed values are true or false (note that an earlier version had 'yes', 'no'). */ - public Builder requiresSubscription(Boolean requiresSubscription) { + @NotNull public Builder requiresSubscription(Boolean requiresSubscription) { this.requiresSubscription = requiresSubscription; return this; } /** * Date when this media object was uploaded to this site. */ - public Builder uploadDate(java.util.Date date) { + @NotNull public Builder uploadDate(java.util.Date date) { this.uploadDate = date; return this; } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -201,13 +205,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -215,133 +219,133 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -363,20 +367,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -384,13 +388,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -398,40 +402,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -439,13 +443,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -453,13 +457,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -467,13 +471,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -481,21 +485,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -503,7 +507,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -511,7 +515,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -519,7 +523,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -527,7 +531,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -535,13 +539,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -549,101 +553,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -651,13 +655,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -665,35 +669,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -701,13 +705,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -715,53 +719,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -769,13 +773,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -783,127 +787,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -911,7 +915,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -919,7 +923,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -927,7 +931,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -935,20 +939,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -956,13 +960,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -970,66 +974,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1037,13 +1041,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1051,40 +1055,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1118,7 +1122,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1153,7 +1157,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1186,7 +1190,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1194,38 +1198,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1304,7 +1308,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1322,171 +1326,171 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedArticle(NewsArticle newsArticle); - Builder associatedArticle(NewsArticle.Builder newsArticle); - Builder bitrate(String bitrate); - Builder contentSize(String contentSize); - Builder contentUrl(String contentUrl); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder embedUrl(String embedUrl); - Builder encodesCreativeWork(CreativeWork creativeWork); - Builder encodesCreativeWork(CreativeWork.Builder creativeWork); - Builder encodingFormat(String encodingFormat); - Builder expires(java.util.Date date); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder playerType(String playerType); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder regionsAllowed(Place place); - Builder regionsAllowed(Place.Builder place); - Builder requiresSubscription(Boolean requiresSubscription); - Builder uploadDate(java.util.Date date); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedArticle(NewsArticle newsArticle); + @NotNull Builder associatedArticle(NewsArticle.Builder newsArticle); + @NotNull Builder bitrate(String bitrate); + @NotNull Builder contentSize(String contentSize); + @NotNull Builder contentUrl(String contentUrl); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder embedUrl(String embedUrl); + @NotNull Builder encodesCreativeWork(CreativeWork creativeWork); + @NotNull Builder encodesCreativeWork(CreativeWork.Builder creativeWork); + @NotNull Builder encodingFormat(String encodingFormat); + @NotNull Builder expires(java.util.Date date); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder playerType(String playerType); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder regionsAllowed(Place place); + @NotNull Builder regionsAllowed(Place.Builder place); + @NotNull Builder requiresSubscription(Boolean requiresSubscription); + @NotNull Builder uploadDate(java.util.Date date); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/DataType.java b/src/main/java/org/schema/DataType.java index 901cdc83..8d921817 100644 --- a/src/main/java/org/schema/DataType.java +++ b/src/main/java/org/schema/DataType.java @@ -18,6 +18,10 @@ 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. */ @@ -25,7 +29,7 @@ public class DataType { /** * Builder for {@link DataType} */ - public static final class DataTypeThingBuilder implements Builder { + static final class DataTypeThingBuilder implements Builder { /** * Creates new {@link DataType} instance. */ @@ -34,7 +38,7 @@ public DataType build() { } } public interface Builder extends ThingBuilder { - + } protected DataType() { diff --git a/src/main/java/org/schema/Dataset.java b/src/main/java/org/schema/Dataset.java index fd807f01..498d8e79 100644 --- a/src/main/java/org/schema/Dataset.java +++ b/src/main/java/org/schema/Dataset.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A body of structured information describing some topic(s) of interest. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_DatasetClass @@ -45,14 +49,14 @@ public Place getSpatial() { /** * The range of temporal applicability of a dataset, e.g. for a 2011 census dataset, the year 2011 (in ISO 8601 time interval format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDatasetTimeInterval() { return myDatasetTimeInterval; } /** * Builder for {@link Dataset} */ - public static final class DatasetThingBuilder implements Builder { + static final class DatasetThingBuilder implements Builder { /** * Creates new {@link Dataset} instance. */ @@ -62,173 +66,173 @@ public Dataset build() { /** * A data catalog contained in the dataset. */ - public Builder includedDataCatalog(DataCatalog dataCatalog) { + @NotNull public Builder includedDataCatalog(DataCatalog dataCatalog) { this.includedDataCatalog = dataCatalog; return this; } /** * A data catalog contained in the dataset. */ - public Builder includedDataCatalog(DataCatalog.Builder dataCatalog) { + @NotNull public Builder includedDataCatalog(DataCatalog.Builder dataCatalog) { return this.includedDataCatalog(dataCatalog.build()); } /** * A downloadable form of this dataset, at a specific location, in a specific format. */ - public Builder distribution(DataDownload dataDownload) { + @NotNull public Builder distribution(DataDownload dataDownload) { this.distribution = dataDownload; return this; } /** * A downloadable form of this dataset, at a specific location, in a specific format. */ - public Builder distribution(DataDownload.Builder dataDownload) { + @NotNull public Builder distribution(DataDownload.Builder dataDownload) { return this.distribution(dataDownload.build()); } /** * The range of spatial applicability of a dataset, e.g. for a dataset of New York weather, the state of New York. */ - public Builder spatial(Place place) { + @NotNull public Builder spatial(Place place) { this.spatial = place; return this; } /** * The range of spatial applicability of a dataset, e.g. for a dataset of New York weather, the state of New York. */ - public Builder spatial(Place.Builder place) { + @NotNull public Builder spatial(Place.Builder place) { return this.spatial(place.build()); } /** * The range of temporal applicability of a dataset, e.g. for a 2011 census dataset, the year 2011 (in ISO 8601 time interval format). */ - public Builder datasetTimeInterval(java.util.Date date) { + @NotNull public Builder datasetTimeInterval(java.util.Date date) { this.datasetTimeInterval = date; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -236,13 +240,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -250,20 +254,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -271,13 +275,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -285,40 +289,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -326,13 +330,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -340,13 +344,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -354,13 +358,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -368,21 +372,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -390,7 +394,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -398,7 +402,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -406,7 +410,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -414,7 +418,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -422,13 +426,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -436,101 +440,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -538,13 +542,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -552,35 +556,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -588,13 +592,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -602,53 +606,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -656,13 +660,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -670,127 +674,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -798,7 +802,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -806,7 +810,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -814,7 +818,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -822,20 +826,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -843,13 +847,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -857,66 +861,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -924,13 +928,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -938,40 +942,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1005,7 +1009,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1040,7 +1044,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1073,7 +1077,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1081,38 +1085,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1179,7 +1183,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1197,151 +1201,151 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder includedDataCatalog(DataCatalog dataCatalog); - Builder includedDataCatalog(DataCatalog.Builder dataCatalog); - Builder distribution(DataDownload dataDownload); - Builder distribution(DataDownload.Builder dataDownload); - Builder spatial(Place place); - Builder spatial(Place.Builder place); - Builder datasetTimeInterval(java.util.Date date); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder includedDataCatalog(DataCatalog dataCatalog); + @NotNull Builder includedDataCatalog(DataCatalog.Builder dataCatalog); + @NotNull Builder distribution(DataDownload dataDownload); + @NotNull Builder distribution(DataDownload.Builder dataDownload); + @NotNull Builder spatial(Place place); + @NotNull Builder spatial(Place.Builder place); + @NotNull Builder datasetTimeInterval(java.util.Date date); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Dataset(DataCatalog includedDataCatalog, DataDownload distribution, Place spatial, java.util.Date datasetTimeInterval, 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) { + protected Dataset(DataCatalog includedDataCatalog, DataDownload distribution, Place spatial, java.util.Date datasetTimeInterval, 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, int 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); myIncludedDataCatalog = includedDataCatalog; myDistribution = distribution; diff --git a/src/main/java/org/schema/DatasetClass.java b/src/main/java/org/schema/DatasetClass.java index 8f9fb5c5..48215365 100644 --- a/src/main/java/org/schema/DatasetClass.java +++ b/src/main/java/org/schema/DatasetClass.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This class is based upon W3C DCAT work, and benefits from collaboration around the DCAT, ADMS and VoID vocabularies. See http://www.w3.org/wiki/WebSchemas/Datasets for full details and mappings. */ @@ -25,7 +29,7 @@ public class DatasetClass { /** * Builder for {@link DatasetClass} */ - public static final class DatasetClassThingBuilder implements Builder { + static final class DatasetClassThingBuilder implements Builder { /** * Creates new {@link DatasetClass} instance. */ @@ -34,7 +38,7 @@ public DatasetClass build() { } } public interface Builder extends ThingBuilder { - + } protected DatasetClass() { diff --git a/src/main/java/org/schema/DatedMoneySpecification.java b/src/main/java/org/schema/DatedMoneySpecification.java index 4760b306..c2dbe63f 100644 --- a/src/main/java/org/schema/DatedMoneySpecification.java +++ b/src/main/java/org/schema/DatedMoneySpecification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A DatedMoneySpecification represents monetary values with optional start and end dates. For example, this could represent an employee's salary over a specific period of time. */ @@ -37,21 +41,21 @@ public String getCurrency() { /** * The start date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getStartDate() { return myStartDate; } /** * The end date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getEndDate() { return myEndDate; } /** * Builder for {@link DatedMoneySpecification} */ - public static final class DatedMoneySpecificationThingBuilder implements Builder { + static final class DatedMoneySpecificationThingBuilder implements Builder { /** * Creates new {@link DatedMoneySpecification} instance. */ @@ -61,15 +65,15 @@ public DatedMoneySpecification build() { /** * The amount of money. */ - public Builder amount(Integer integer) { + @NotNull public Builder amount(int amount) { if (this.amount == null) this.amount = new Number(); - this.amount.setInteger(integer); + this.amount.setInt(amount); return this; } /** * The amount of money. */ - public Builder amount(Long amount) { + @NotNull public Builder amount(long amount) { if (this.amount == null) this.amount = new Number(); this.amount.setLong(amount); return this; @@ -77,7 +81,7 @@ public Builder amount(Long amount) { /** * The amount of money. */ - public Builder amount(Float amount) { + @NotNull public Builder amount(float amount) { if (this.amount == null) this.amount = new Number(); this.amount.setFloat(amount); return this; @@ -85,7 +89,7 @@ public Builder amount(Float amount) { /** * The amount of money. */ - public Builder amount(Double amount) { + @NotNull public Builder amount(double amount) { if (this.amount == null) this.amount = new Number(); this.amount.setDouble(amount); return this; @@ -93,7 +97,7 @@ public Builder amount(Double amount) { /** * The amount of money. */ - public Builder amount(String amount) { + @NotNull public Builder amount(String amount) { if (this.amount == null) this.amount = new Number(); this.amount.setString(amount); return this; @@ -101,42 +105,42 @@ public Builder amount(String amount) { /** * The currency in which the monetary amount is expressed (in 3-letter ISO 4217 format). */ - public Builder currency(String currency) { + @NotNull public Builder currency(String currency) { this.currency = currency; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -170,7 +174,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -205,7 +209,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -238,7 +242,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -246,38 +250,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,26 +303,26 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder amount(Integer integer); - Builder amount(Long amount); - Builder amount(Float amount); - Builder amount(Double amount); - Builder amount(String amount); - Builder currency(String currency); - Builder startDate(java.util.Date date); - Builder endDate(java.util.Date date); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder amount(int amount); + @NotNull Builder amount(long amount); + @NotNull Builder amount(float amount); + @NotNull Builder amount(double amount); + @NotNull Builder amount(String amount); + @NotNull Builder currency(String currency); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DatedMoneySpecification(Number amount, String currency, java.util.Date startDate, java.util.Date endDate, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/DayOfWeek.java b/src/main/java/org/schema/DayOfWeek.java index 5847040a..73858a3e 100644 --- a/src/main/java/org/schema/DayOfWeek.java +++ b/src/main/java/org/schema/DayOfWeek.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The day of the week, e.g. used to specify to which day the opening hours of an OpeningHoursSpecification refer. *
@@ -38,7 +42,7 @@ public class DayOfWeek extends Enumeration { /** * Builder for {@link DayOfWeek} */ - public static final class DayOfWeekThingBuilder implements Builder { + static final class DayOfWeekThingBuilder implements Builder { /** * Creates new {@link DayOfWeek} instance. */ @@ -48,7 +52,7 @@ public DayOfWeek build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -56,13 +60,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -70,27 +74,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -124,7 +128,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -159,7 +163,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -192,7 +196,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -200,38 +204,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -250,22 +254,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DayOfWeek(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/DaySpa.java b/src/main/java/org/schema/DaySpa.java index be960910..77e3e02f 100644 --- a/src/main/java/org/schema/DaySpa.java +++ b/src/main/java/org/schema/DaySpa.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A day spa. */ @@ -25,7 +29,7 @@ public class DaySpa extends HealthAndBeautyBusiness { /** * Builder for {@link DaySpa} */ - public static final class DaySpaThingBuilder implements Builder { + static final class DaySpaThingBuilder implements Builder { /** * Creates new {@link DaySpa} instance. */ @@ -35,107 +39,107 @@ public DaySpa build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DeactivateAction.java b/src/main/java/org/schema/DeactivateAction.java index 42f29cfb..cb75777c 100644 --- a/src/main/java/org/schema/DeactivateAction.java +++ b/src/main/java/org/schema/DeactivateAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of stopping or deactivating a device or application (e.g. stopping a timer or turning off a flashlight). */ @@ -25,7 +29,7 @@ public class DeactivateAction extends ControlAction { /** * Builder for {@link DeactivateAction} */ - public static final class DeactivateActionThingBuilder implements Builder { + static final class DeactivateActionThingBuilder implements Builder { /** * Creates new {@link DeactivateAction} instance. */ @@ -35,7 +39,7 @@ public DeactivateAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DefenceEstablishment.java b/src/main/java/org/schema/DefenceEstablishment.java index 81b902d1..493e6f72 100644 --- a/src/main/java/org/schema/DefenceEstablishment.java +++ b/src/main/java/org/schema/DefenceEstablishment.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A defence establishment, such as an army or navy base. */ @@ -25,7 +29,7 @@ public class DefenceEstablishment extends GovernmentBuilding { /** * Builder for {@link DefenceEstablishment} */ - public static final class DefenceEstablishmentThingBuilder implements Builder { + static final class DefenceEstablishmentThingBuilder implements Builder { /** * Creates new {@link DefenceEstablishment} instance. */ @@ -35,73 +39,73 @@ public DefenceEstablishment build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DeleteAction.java b/src/main/java/org/schema/DeleteAction.java index 3b22d107..e062bc0f 100644 --- a/src/main/java/org/schema/DeleteAction.java +++ b/src/main/java/org/schema/DeleteAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of editing a recipient by removing one of its objects. */ @@ -25,7 +29,7 @@ public class DeleteAction extends UpdateAction { /** * Builder for {@link DeleteAction} */ - public static final class DeleteActionThingBuilder implements Builder { + static final class DeleteActionThingBuilder implements Builder { /** * Creates new {@link DeleteAction} instance. */ @@ -35,20 +39,20 @@ public DeleteAction build() { /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing thing) { + @NotNull public Builder targetCollection(Thing thing) { this.targetCollection = thing; return this; } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing.Builder thing) { + @NotNull public Builder targetCollection(Thing.Builder thing) { return this.targetCollection(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder targetCollection(Thing thing); - Builder targetCollection(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder targetCollection(Thing thing); + @NotNull Builder targetCollection(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DeliveryChargeSpecification.java b/src/main/java/org/schema/DeliveryChargeSpecification.java index 726997a0..de20058a 100644 --- a/src/main/java/org/schema/DeliveryChargeSpecification.java +++ b/src/main/java/org/schema/DeliveryChargeSpecification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The price for the delivery of an offer using a particular delivery method. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -44,7 +48,7 @@ public GeoShapeOrPlaceOrString getIneligibleRegion() { /** * Builder for {@link DeliveryChargeSpecification} */ - public static final class DeliveryChargeSpecificationThingBuilder implements Builder { + static final class DeliveryChargeSpecificationThingBuilder implements Builder { /** * Creates new {@link DeliveryChargeSpecification} instance. */ @@ -54,20 +58,20 @@ public DeliveryChargeSpecification build() { /** * The delivery method(s) to which the delivery charge or payment charge specification applies. */ - public Builder appliesToDeliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder appliesToDeliveryMethod(DeliveryMethod deliveryMethod) { this.appliesToDeliveryMethod = deliveryMethod; return this; } /** * The delivery method(s) to which the delivery charge or payment charge specification applies. */ - public Builder appliesToDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder appliesToDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.appliesToDeliveryMethod(deliveryMethod.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(GeoShape geoShape) { + @NotNull public Builder eligibleRegion(GeoShape geoShape) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setGeoShape(geoShape); return this; @@ -75,13 +79,13 @@ public Builder eligibleRegion(GeoShape geoShape) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(GeoShape.Builder geoShape) { + @NotNull public Builder eligibleRegion(GeoShape.Builder geoShape) { return this.eligibleRegion(geoShape.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(Place place) { + @NotNull public Builder eligibleRegion(Place place) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setPlace(place); return this; @@ -89,13 +93,13 @@ public Builder eligibleRegion(Place place) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(Place.Builder place) { + @NotNull public Builder eligibleRegion(Place.Builder place) { return this.eligibleRegion(place.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(String eligibleRegion) { + @NotNull public Builder eligibleRegion(String eligibleRegion) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setString(eligibleRegion); return this; @@ -103,7 +107,7 @@ public Builder eligibleRegion(String eligibleRegion) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(GeoShape geoShape) { + @NotNull public Builder ineligibleRegion(GeoShape geoShape) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setGeoShape(geoShape); return this; @@ -111,13 +115,13 @@ public Builder ineligibleRegion(GeoShape geoShape) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(GeoShape.Builder geoShape) { + @NotNull public Builder ineligibleRegion(GeoShape.Builder geoShape) { return this.ineligibleRegion(geoShape.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(Place place) { + @NotNull public Builder ineligibleRegion(Place place) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setPlace(place); return this; @@ -125,13 +129,13 @@ public Builder ineligibleRegion(Place place) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(Place.Builder place) { + @NotNull public Builder ineligibleRegion(Place.Builder place) { return this.ineligibleRegion(place.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(String ineligibleRegion) { + @NotNull public Builder ineligibleRegion(String ineligibleRegion) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setString(ineligibleRegion); return this; @@ -139,41 +143,41 @@ public Builder ineligibleRegion(String ineligibleRegion) { /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { this.eligibleQuantity = quantitativeValue; return this; } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { return this.eligibleQuantity(quantitativeValue.build()); } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { this.eligibleTransactionVolume = priceSpecification; return this; } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { return this.eligibleTransactionVolume(priceSpecification.build()); } /** * The highest price if the price is a range. */ - public Builder maxPrice(Integer integer) { + @NotNull public Builder maxPrice(int maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); - this.maxPrice.setInteger(integer); + this.maxPrice.setInt(maxPrice); return this; } /** * The highest price if the price is a range. */ - public Builder maxPrice(Long maxPrice) { + @NotNull public Builder maxPrice(long maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setLong(maxPrice); return this; @@ -181,7 +185,7 @@ public Builder maxPrice(Long maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(Float maxPrice) { + @NotNull public Builder maxPrice(float maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setFloat(maxPrice); return this; @@ -189,7 +193,7 @@ public Builder maxPrice(Float maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(Double maxPrice) { + @NotNull public Builder maxPrice(double maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setDouble(maxPrice); return this; @@ -197,7 +201,7 @@ public Builder maxPrice(Double maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(String maxPrice) { + @NotNull public Builder maxPrice(String maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setString(maxPrice); return this; @@ -205,15 +209,15 @@ public Builder maxPrice(String maxPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Integer integer) { + @NotNull public Builder minPrice(int minPrice) { if (this.minPrice == null) this.minPrice = new Number(); - this.minPrice.setInteger(integer); + this.minPrice.setInt(minPrice); return this; } /** * The lowest price if the price is a range. */ - public Builder minPrice(Long minPrice) { + @NotNull public Builder minPrice(long minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setLong(minPrice); return this; @@ -221,7 +225,7 @@ public Builder minPrice(Long minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Float minPrice) { + @NotNull public Builder minPrice(float minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setFloat(minPrice); return this; @@ -229,7 +233,7 @@ public Builder minPrice(Float minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Double minPrice) { + @NotNull public Builder minPrice(double minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setDouble(minPrice); return this; @@ -237,7 +241,7 @@ public Builder minPrice(Double minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(String minPrice) { + @NotNull public Builder minPrice(String minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setString(minPrice); return this; @@ -265,7 +269,7 @@ public Builder minPrice(String minPrice) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -293,7 +297,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -301,49 +305,49 @@ public Builder price(String price) { /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The end of the validity of offer, price specification, or opening hours data. */ - public Builder validThrough(java.util.Date date) { + @NotNull public Builder validThrough(java.util.Date date) { this.validThrough = date; return this; } /** * Specifies whether the applicable value-added tax (VAT) is included in the price specification or not. */ - public Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded) { + @NotNull public Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded) { this.valueAddedTaxIncluded = valueAddedTaxIncluded; return this; } /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -377,7 +381,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -412,7 +416,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -445,7 +449,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -453,38 +457,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -514,50 +518,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder appliesToDeliveryMethod(DeliveryMethod deliveryMethod); - Builder appliesToDeliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder eligibleRegion(GeoShape geoShape); - Builder eligibleRegion(GeoShape.Builder geoShape); - Builder eligibleRegion(Place place); - Builder eligibleRegion(Place.Builder place); - Builder eligibleRegion(String eligibleRegion); - Builder ineligibleRegion(GeoShape geoShape); - Builder ineligibleRegion(GeoShape.Builder geoShape); - Builder ineligibleRegion(Place place); - Builder ineligibleRegion(Place.Builder place); - Builder ineligibleRegion(String ineligibleRegion); - Builder eligibleQuantity(QuantitativeValue quantitativeValue); - Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); - Builder eligibleTransactionVolume(PriceSpecification priceSpecification); - Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); - Builder maxPrice(Integer integer); - Builder maxPrice(Long maxPrice); - Builder maxPrice(Float maxPrice); - Builder maxPrice(Double maxPrice); - Builder maxPrice(String maxPrice); - Builder minPrice(Integer integer); - Builder minPrice(Long minPrice); - Builder minPrice(Float minPrice); - Builder minPrice(Double minPrice); - Builder minPrice(String minPrice); - Builder price(Number number); - Builder price(String price); - Builder validFrom(java.util.Date date); - Builder validThrough(java.util.Date date); - Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded); - Builder priceCurrency(String priceCurrency); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder appliesToDeliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder appliesToDeliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder eligibleRegion(GeoShape geoShape); + @NotNull Builder eligibleRegion(GeoShape.Builder geoShape); + @NotNull Builder eligibleRegion(Place place); + @NotNull Builder eligibleRegion(Place.Builder place); + @NotNull Builder eligibleRegion(String eligibleRegion); + @NotNull Builder ineligibleRegion(GeoShape geoShape); + @NotNull Builder ineligibleRegion(GeoShape.Builder geoShape); + @NotNull Builder ineligibleRegion(Place place); + @NotNull Builder ineligibleRegion(Place.Builder place); + @NotNull Builder ineligibleRegion(String ineligibleRegion); + @NotNull Builder eligibleQuantity(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleTransactionVolume(PriceSpecification priceSpecification); + @NotNull Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); + @NotNull Builder maxPrice(int maxPrice); + @NotNull Builder maxPrice(long maxPrice); + @NotNull Builder maxPrice(float maxPrice); + @NotNull Builder maxPrice(double maxPrice); + @NotNull Builder maxPrice(String maxPrice); + @NotNull Builder minPrice(int minPrice); + @NotNull Builder minPrice(long minPrice); + @NotNull Builder minPrice(float minPrice); + @NotNull Builder minPrice(double minPrice); + @NotNull Builder minPrice(String minPrice); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validThrough(java.util.Date date); + @NotNull Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/DeliveryEvent.java b/src/main/java/org/schema/DeliveryEvent.java index d8e0f8d1..490455b2 100644 --- a/src/main/java/org/schema/DeliveryEvent.java +++ b/src/main/java/org/schema/DeliveryEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An event involving the delivery of an item. */ @@ -31,14 +35,14 @@ public String getAccessCode() { /** * When the item is available for pickup from the store, locker, etc. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getAvailableFrom() { return myAvailableFrom; } /** * After this date, the item will no longer be available for pickup. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getAvailableThrough() { return myAvailableThrough; } @@ -51,7 +55,7 @@ public DeliveryMethod getHasDeliveryMethod() { /** * Builder for {@link DeliveryEvent} */ - public static final class DeliveryEventThingBuilder implements Builder { + static final class DeliveryEventThingBuilder implements Builder { /** * Creates new {@link DeliveryEvent} instance. */ @@ -61,54 +65,54 @@ public DeliveryEvent build() { /** * Password, PIN, or access code needed for delivery (e.g. from a locker). */ - public Builder accessCode(String accessCode) { + @NotNull public Builder accessCode(String accessCode) { this.accessCode = accessCode; return this; } /** * When the item is available for pickup from the store, locker, etc. */ - public Builder availableFrom(java.util.Date date) { + @NotNull public Builder availableFrom(java.util.Date date) { this.availableFrom = date; return this; } /** * After this date, the item will no longer be available for pickup. */ - public Builder availableThrough(java.util.Date date) { + @NotNull public Builder availableThrough(java.util.Date date) { this.availableThrough = date; return this; } /** * Method used for delivery or shipping. */ - public Builder hasDeliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder hasDeliveryMethod(DeliveryMethod deliveryMethod) { this.hasDeliveryMethod = deliveryMethod; return this; } /** * Method used for delivery or shipping. */ - public Builder hasDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder hasDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.hasDeliveryMethod(deliveryMethod.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -116,13 +120,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -130,13 +134,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -144,13 +148,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -158,53 +162,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -212,13 +216,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -226,20 +230,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -247,13 +251,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -261,113 +265,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -401,7 +405,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -436,7 +440,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -469,7 +473,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -477,38 +481,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -548,61 +552,61 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder accessCode(String accessCode); - Builder availableFrom(java.util.Date date); - Builder availableThrough(java.util.Date date); - Builder hasDeliveryMethod(DeliveryMethod deliveryMethod); - Builder hasDeliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder accessCode(String accessCode); + @NotNull Builder availableFrom(java.util.Date date); + @NotNull Builder availableThrough(java.util.Date date); + @NotNull Builder hasDeliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder hasDeliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DeliveryEvent(String accessCode, java.util.Date availableFrom, java.util.Date availableThrough, DeliveryMethod hasDeliveryMethod, 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) { diff --git a/src/main/java/org/schema/DeliveryMethod.java b/src/main/java/org/schema/DeliveryMethod.java index 9d06f347..a62ec1e9 100644 --- a/src/main/java/org/schema/DeliveryMethod.java +++ b/src/main/java/org/schema/DeliveryMethod.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A delivery method is a standardized procedure for transferring the product or service to the destination of fulfillment chosen by the customer. Delivery methods are characterized by the means of transportation used, and by the organization or group that is the contracting party for the sending organization or person. *
@@ -38,7 +42,7 @@ public class DeliveryMethod extends Enumeration { /** * Builder for {@link DeliveryMethod} */ - public static final class DeliveryMethodThingBuilder implements Builder { + static final class DeliveryMethodThingBuilder implements Builder { /** * Creates new {@link DeliveryMethod} instance. */ @@ -48,7 +52,7 @@ public DeliveryMethod build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -56,13 +60,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -70,27 +74,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -124,7 +128,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -159,7 +163,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -192,7 +196,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -200,38 +204,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -250,22 +254,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DeliveryMethod(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Demand.java b/src/main/java/org/schema/Demand.java index ea5b8978..57728e6f 100644 --- a/src/main/java/org/schema/Demand.java +++ b/src/main/java/org/schema/Demand.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A demand entity represents the public, not necessarily binding, not necessarily exclusive, announcement by an organization or person to seek a certain type of goods or services. For describing demand using this type, the very same properties used for Offer apply. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -44,14 +48,14 @@ public ItemAvailability getAvailability() { /** * The end of the availability of the product or service included in the offer. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getAvailabilityEnds() { return myAvailabilityEnds; } /** * The beginning of the availability of the product or service included in the offer. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getAvailabilityStarts() { return myAvailabilityStarts; } @@ -190,14 +194,14 @@ public String getSku() { /** * The date when the item becomes valid. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidFrom() { return myValidFrom; } /** * The end of the validity of offer, price specification, or opening hours data. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidThrough() { return myValidThrough; } @@ -210,7 +214,7 @@ public WarrantyPromise getWarranty() { /** * Builder for {@link Demand} */ - public static final class DemandThingBuilder implements Builder { + static final class DemandThingBuilder implements Builder { /** * Creates new {@link Demand} instance. */ @@ -220,151 +224,151 @@ public Demand build() { /** * The payment method(s) accepted by seller for this offer. */ - public Builder acceptedPaymentMethod(PaymentMethod paymentMethod) { + @NotNull public Builder acceptedPaymentMethod(PaymentMethod paymentMethod) { this.acceptedPaymentMethod = paymentMethod; return this; } /** * The payment method(s) accepted by seller for this offer. */ - public Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod) { + @NotNull public Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod) { return this.acceptedPaymentMethod(paymentMethod.build()); } /** * The amount of time that is required between accepting the offer and the actual usage of the resource or service. */ - public Builder advanceBookingRequirement(QuantitativeValue quantitativeValue) { + @NotNull public Builder advanceBookingRequirement(QuantitativeValue quantitativeValue) { this.advanceBookingRequirement = quantitativeValue; return this; } /** * The amount of time that is required between accepting the offer and the actual usage of the resource or service. */ - public Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue) { return this.advanceBookingRequirement(quantitativeValue.build()); } /** * The availability of this item—for example In stock, Out of stock, Pre-order, etc. */ - public Builder availability(ItemAvailability itemAvailability) { + @NotNull public Builder availability(ItemAvailability itemAvailability) { this.availability = itemAvailability; return this; } /** * The availability of this item—for example In stock, Out of stock, Pre-order, etc. */ - public Builder availability(ItemAvailability.Builder itemAvailability) { + @NotNull public Builder availability(ItemAvailability.Builder itemAvailability) { return this.availability(itemAvailability.build()); } /** * The end of the availability of the product or service included in the offer. */ - public Builder availabilityEnds(java.util.Date date) { + @NotNull public Builder availabilityEnds(java.util.Date date) { this.availabilityEnds = date; return this; } /** * The beginning of the availability of the product or service included in the offer. */ - public Builder availabilityStarts(java.util.Date date) { + @NotNull public Builder availabilityStarts(java.util.Date date) { this.availabilityStarts = date; return this; } /** * The place(s) from which the offer can be obtained (e.g. store locations). */ - public Builder availableAtOrFrom(Place place) { + @NotNull public Builder availableAtOrFrom(Place place) { this.availableAtOrFrom = place; return this; } /** * The place(s) from which the offer can be obtained (e.g. store locations). */ - public Builder availableAtOrFrom(Place.Builder place) { + @NotNull public Builder availableAtOrFrom(Place.Builder place) { return this.availableAtOrFrom(place.build()); } /** * The delivery method(s) available for this offer. */ - public Builder availableDeliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder availableDeliveryMethod(DeliveryMethod deliveryMethod) { this.availableDeliveryMethod = deliveryMethod; return this; } /** * The delivery method(s) available for this offer. */ - public Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.availableDeliveryMethod(deliveryMethod.build()); } /** * The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell. */ - public Builder businessFunction(BusinessFunction businessFunction) { + @NotNull public Builder businessFunction(BusinessFunction businessFunction) { this.businessFunction = businessFunction; return this; } /** * The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell. */ - public Builder businessFunction(BusinessFunction.Builder businessFunction) { + @NotNull public Builder businessFunction(BusinessFunction.Builder businessFunction) { return this.businessFunction(businessFunction.build()); } /** * The typical delay between the receipt of the order and the goods leaving the warehouse. */ - public Builder deliveryLeadTime(QuantitativeValue quantitativeValue) { + @NotNull public Builder deliveryLeadTime(QuantitativeValue quantitativeValue) { this.deliveryLeadTime = quantitativeValue; return this; } /** * The typical delay between the receipt of the order and the goods leaving the warehouse. */ - public Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue) { return this.deliveryLeadTime(quantitativeValue.build()); } /** * The type(s) of customers for which the given offer is valid. */ - public Builder eligibleCustomerType(BusinessEntityType businessEntityType) { + @NotNull public Builder eligibleCustomerType(BusinessEntityType businessEntityType) { this.eligibleCustomerType = businessEntityType; return this; } /** * The type(s) of customers for which the given offer is valid. */ - public Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType) { + @NotNull public Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType) { return this.eligibleCustomerType(businessEntityType.build()); } /** * The duration for which the given offer is valid. */ - public Builder eligibleDuration(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleDuration(QuantitativeValue quantitativeValue) { this.eligibleDuration = quantitativeValue; return this; } /** * The duration for which the given offer is valid. */ - public Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue) { return this.eligibleDuration(quantitativeValue.build()); } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { this.eligibleQuantity = quantitativeValue; return this; } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { return this.eligibleQuantity(quantitativeValue.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(GeoShape geoShape) { + @NotNull public Builder eligibleRegion(GeoShape geoShape) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setGeoShape(geoShape); return this; @@ -372,13 +376,13 @@ public Builder eligibleRegion(GeoShape geoShape) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(GeoShape.Builder geoShape) { + @NotNull public Builder eligibleRegion(GeoShape.Builder geoShape) { return this.eligibleRegion(geoShape.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(Place place) { + @NotNull public Builder eligibleRegion(Place place) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setPlace(place); return this; @@ -386,13 +390,13 @@ public Builder eligibleRegion(Place place) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(Place.Builder place) { + @NotNull public Builder eligibleRegion(Place.Builder place) { return this.eligibleRegion(place.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(String eligibleRegion) { + @NotNull public Builder eligibleRegion(String eligibleRegion) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setString(eligibleRegion); return this; @@ -400,7 +404,7 @@ public Builder eligibleRegion(String eligibleRegion) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(GeoShape geoShape) { + @NotNull public Builder ineligibleRegion(GeoShape geoShape) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setGeoShape(geoShape); return this; @@ -408,13 +412,13 @@ public Builder ineligibleRegion(GeoShape geoShape) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(GeoShape.Builder geoShape) { + @NotNull public Builder ineligibleRegion(GeoShape.Builder geoShape) { return this.ineligibleRegion(geoShape.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(Place place) { + @NotNull public Builder ineligibleRegion(Place place) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setPlace(place); return this; @@ -422,13 +426,13 @@ public Builder ineligibleRegion(Place place) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(Place.Builder place) { + @NotNull public Builder ineligibleRegion(Place.Builder place) { return this.ineligibleRegion(place.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(String ineligibleRegion) { + @NotNull public Builder ineligibleRegion(String ineligibleRegion) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setString(ineligibleRegion); return this; @@ -436,175 +440,175 @@ public Builder ineligibleRegion(String ineligibleRegion) { /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { this.eligibleTransactionVolume = priceSpecification; return this; } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { return this.eligibleTransactionVolume(priceSpecification.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * This links to a node or nodes indicating the exact quantity of the products included in the offer. */ - public Builder includesObject(TypeAndQuantityNode typeAndQuantityNode) { + @NotNull public Builder includesObject(TypeAndQuantityNode typeAndQuantityNode) { this.includesObject = typeAndQuantityNode; return this; } /** * This links to a node or nodes indicating the exact quantity of the products included in the offer. */ - public Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode) { + @NotNull public Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode) { return this.includesObject(typeAndQuantityNode.build()); } /** * The current approximate inventory level for the item or items. */ - public Builder inventoryLevel(QuantitativeValue quantitativeValue) { + @NotNull public Builder inventoryLevel(QuantitativeValue quantitativeValue) { this.inventoryLevel = quantitativeValue; return this; } /** * The current approximate inventory level for the item or items. */ - public Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue) { return this.inventoryLevel(quantitativeValue.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * The item being offered. */ - public Builder itemOffered(Product product) { + @NotNull public Builder itemOffered(Product product) { this.itemOffered = product; return this; } /** * The item being offered. */ - public Builder itemOffered(Product.Builder product) { + @NotNull public Builder itemOffered(Product.Builder product) { return this.itemOffered(product.build()); } /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider. */ - public Builder seller(Participant participant) { + @NotNull public Builder seller(Participant participant) { this.seller = participant; return this; } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The end of the validity of offer, price specification, or opening hours data. */ - public Builder validThrough(java.util.Date date) { + @NotNull public Builder validThrough(java.util.Date date) { this.validThrough = date; return this; } /** * The warranty promise(s) included in the offer. */ - public Builder warranty(WarrantyPromise warrantyPromise) { + @NotNull public Builder warranty(WarrantyPromise warrantyPromise) { this.warranty = warrantyPromise; return this; } /** * The warranty promise(s) included in the offer. */ - public Builder warranty(WarrantyPromise.Builder warrantyPromise) { + @NotNull public Builder warranty(WarrantyPromise.Builder warrantyPromise) { return this.warranty(warrantyPromise.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -638,7 +642,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -673,7 +677,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -706,7 +710,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -714,38 +718,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -793,73 +797,73 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptedPaymentMethod(PaymentMethod paymentMethod); - Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod); - Builder advanceBookingRequirement(QuantitativeValue quantitativeValue); - Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue); - Builder availability(ItemAvailability itemAvailability); - Builder availability(ItemAvailability.Builder itemAvailability); - Builder availabilityEnds(java.util.Date date); - Builder availabilityStarts(java.util.Date date); - Builder availableAtOrFrom(Place place); - Builder availableAtOrFrom(Place.Builder place); - Builder availableDeliveryMethod(DeliveryMethod deliveryMethod); - Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder businessFunction(BusinessFunction businessFunction); - Builder businessFunction(BusinessFunction.Builder businessFunction); - Builder deliveryLeadTime(QuantitativeValue quantitativeValue); - Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue); - Builder eligibleCustomerType(BusinessEntityType businessEntityType); - Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType); - Builder eligibleDuration(QuantitativeValue quantitativeValue); - Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue); - Builder eligibleQuantity(QuantitativeValue quantitativeValue); - Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); - Builder eligibleRegion(GeoShape geoShape); - Builder eligibleRegion(GeoShape.Builder geoShape); - Builder eligibleRegion(Place place); - Builder eligibleRegion(Place.Builder place); - Builder eligibleRegion(String eligibleRegion); - Builder ineligibleRegion(GeoShape geoShape); - Builder ineligibleRegion(GeoShape.Builder geoShape); - Builder ineligibleRegion(Place place); - Builder ineligibleRegion(Place.Builder place); - Builder ineligibleRegion(String ineligibleRegion); - Builder eligibleTransactionVolume(PriceSpecification priceSpecification); - Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder includesObject(TypeAndQuantityNode typeAndQuantityNode); - Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode); - Builder inventoryLevel(QuantitativeValue quantitativeValue); - Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder itemOffered(Product product); - Builder itemOffered(Product.Builder product); - Builder mpn(String mpn); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder seller(Participant participant); - Builder sku(String sku); - Builder validFrom(java.util.Date date); - Builder validThrough(java.util.Date date); - Builder warranty(WarrantyPromise warrantyPromise); - Builder warranty(WarrantyPromise.Builder warrantyPromise); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptedPaymentMethod(PaymentMethod paymentMethod); + @NotNull Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod); + @NotNull Builder advanceBookingRequirement(QuantitativeValue quantitativeValue); + @NotNull Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder availability(ItemAvailability itemAvailability); + @NotNull Builder availability(ItemAvailability.Builder itemAvailability); + @NotNull Builder availabilityEnds(java.util.Date date); + @NotNull Builder availabilityStarts(java.util.Date date); + @NotNull Builder availableAtOrFrom(Place place); + @NotNull Builder availableAtOrFrom(Place.Builder place); + @NotNull Builder availableDeliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder businessFunction(BusinessFunction businessFunction); + @NotNull Builder businessFunction(BusinessFunction.Builder businessFunction); + @NotNull Builder deliveryLeadTime(QuantitativeValue quantitativeValue); + @NotNull Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleCustomerType(BusinessEntityType businessEntityType); + @NotNull Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType); + @NotNull Builder eligibleDuration(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleRegion(GeoShape geoShape); + @NotNull Builder eligibleRegion(GeoShape.Builder geoShape); + @NotNull Builder eligibleRegion(Place place); + @NotNull Builder eligibleRegion(Place.Builder place); + @NotNull Builder eligibleRegion(String eligibleRegion); + @NotNull Builder ineligibleRegion(GeoShape geoShape); + @NotNull Builder ineligibleRegion(GeoShape.Builder geoShape); + @NotNull Builder ineligibleRegion(Place place); + @NotNull Builder ineligibleRegion(Place.Builder place); + @NotNull Builder ineligibleRegion(String ineligibleRegion); + @NotNull Builder eligibleTransactionVolume(PriceSpecification priceSpecification); + @NotNull Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder includesObject(TypeAndQuantityNode typeAndQuantityNode); + @NotNull Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode); + @NotNull Builder inventoryLevel(QuantitativeValue quantitativeValue); + @NotNull Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder itemOffered(Product product); + @NotNull Builder itemOffered(Product.Builder product); + @NotNull Builder mpn(String mpn); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder seller(Participant participant); + @NotNull Builder sku(String sku); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validThrough(java.util.Date date); + @NotNull Builder warranty(WarrantyPromise warrantyPromise); + @NotNull Builder warranty(WarrantyPromise.Builder warrantyPromise); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Demand(PaymentMethod acceptedPaymentMethod, QuantitativeValue advanceBookingRequirement, ItemAvailability availability, java.util.Date availabilityEnds, java.util.Date availabilityStarts, Place availableAtOrFrom, DeliveryMethod availableDeliveryMethod, BusinessFunction businessFunction, 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, PriceSpecification priceSpecification, Participant seller, String sku, java.util.Date validFrom, java.util.Date validThrough, WarrantyPromise warranty, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/DemoAlbum.java b/src/main/java/org/schema/DemoAlbum.java index 665ecfbd..12dfd20d 100644 --- a/src/main/java/org/schema/DemoAlbum.java +++ b/src/main/java/org/schema/DemoAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * DemoAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class DemoAlbum { /** * Builder for {@link DemoAlbum} */ - public static final class DemoAlbumThingBuilder implements Builder { + static final class DemoAlbumThingBuilder implements Builder { /** * Creates new {@link DemoAlbum} instance. */ @@ -35,7 +39,7 @@ public DemoAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected DemoAlbum() { diff --git a/src/main/java/org/schema/Dentist.java b/src/main/java/org/schema/Dentist.java index 9ad1d730..f9f0952d 100644 --- a/src/main/java/org/schema/Dentist.java +++ b/src/main/java/org/schema/Dentist.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A dentist. */ @@ -25,7 +29,7 @@ public class Dentist extends ProfessionalService { /** * Builder for {@link Dentist} */ - public static final class DentistThingBuilder implements Builder { + static final class DentistThingBuilder implements Builder { /** * Creates new {@link Dentist} instance. */ @@ -35,107 +39,107 @@ public Dentist build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Dentistry.java b/src/main/java/org/schema/Dentistry.java index 4dfa6dac..1043f2a8 100644 --- a/src/main/java/org/schema/Dentistry.java +++ b/src/main/java/org/schema/Dentistry.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Dentistry. */ @@ -25,7 +29,7 @@ public class Dentistry { /** * Builder for {@link Dentistry} */ - public static final class DentistryThingBuilder implements Builder { + static final class DentistryThingBuilder implements Builder { /** * Creates new {@link Dentistry} instance. */ @@ -34,7 +38,7 @@ public Dentistry build() { } } public interface Builder extends ThingBuilder { - + } protected Dentistry() { diff --git a/src/main/java/org/schema/DepartAction.java b/src/main/java/org/schema/DepartAction.java index 41edc112..101b5dfb 100644 --- a/src/main/java/org/schema/DepartAction.java +++ b/src/main/java/org/schema/DepartAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of departing from a place. An agent departs from an fromLocation for a destination, optionally with participants. */ @@ -25,7 +29,7 @@ public class DepartAction extends MoveAction { /** * Builder for {@link DepartAction} */ - public static final class DepartActionThingBuilder implements Builder { + static final class DepartActionThingBuilder implements Builder { /** * Creates new {@link DepartAction} instance. */ @@ -35,33 +39,33 @@ public DepartAction build() { /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -69,13 +73,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -83,7 +87,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -91,7 +95,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -100,67 +104,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -194,7 +198,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -229,7 +233,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -270,38 +274,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -327,34 +331,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DepartmentStore.java b/src/main/java/org/schema/DepartmentStore.java index 94a696ab..1389eb0f 100644 --- a/src/main/java/org/schema/DepartmentStore.java +++ b/src/main/java/org/schema/DepartmentStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A department store. */ @@ -25,7 +29,7 @@ public class DepartmentStore extends Store { /** * Builder for {@link DepartmentStore} */ - public static final class DepartmentStoreThingBuilder implements Builder { + static final class DepartmentStoreThingBuilder implements Builder { /** * Creates new {@link DepartmentStore} instance. */ @@ -35,107 +39,107 @@ public DepartmentStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Dermatologic.java b/src/main/java/org/schema/Dermatologic.java index a5814d27..e2cfcf08 100644 --- a/src/main/java/org/schema/Dermatologic.java +++ b/src/main/java/org/schema/Dermatologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to diagnosis and treatment of disorders of skin. */ @@ -25,7 +29,7 @@ public class Dermatologic { /** * Builder for {@link Dermatologic} */ - public static final class DermatologicThingBuilder implements Builder { + static final class DermatologicThingBuilder implements Builder { /** * Creates new {@link Dermatologic} instance. */ @@ -34,7 +38,7 @@ public Dermatologic build() { } } public interface Builder extends ThingBuilder { - + } protected Dermatologic() { diff --git a/src/main/java/org/schema/Diagnostic.java b/src/main/java/org/schema/Diagnostic.java index 59ba31f0..313f66b1 100644 --- a/src/main/java/org/schema/Diagnostic.java +++ b/src/main/java/org/schema/Diagnostic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical device used for diagnostic purposes. */ @@ -25,7 +29,7 @@ public class Diagnostic { /** * Builder for {@link Diagnostic} */ - public static final class DiagnosticThingBuilder implements Builder { + static final class DiagnosticThingBuilder implements Builder { /** * Creates new {@link Diagnostic} instance. */ @@ -34,7 +38,7 @@ public Diagnostic build() { } } public interface Builder extends ThingBuilder { - + } protected Diagnostic() { diff --git a/src/main/java/org/schema/DiagnosticLab.java b/src/main/java/org/schema/DiagnosticLab.java index e945a997..6cd7e558 100644 --- a/src/main/java/org/schema/DiagnosticLab.java +++ b/src/main/java/org/schema/DiagnosticLab.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical laboratory that offers on-site or off-site diagnostic services. */ @@ -31,7 +35,7 @@ public MedicalTest getAvailableTest() { /** * Builder for {@link DiagnosticLab} */ - public static final class DiagnosticLabThingBuilder implements Builder { + static final class DiagnosticLabThingBuilder implements Builder { /** * Creates new {@link DiagnosticLab} instance. */ @@ -41,120 +45,120 @@ public DiagnosticLab build() { /** * A diagnostic test or procedure offered by this lab. */ - public Builder availableTest(MedicalTest medicalTest) { + @NotNull public Builder availableTest(MedicalTest medicalTest) { this.availableTest = medicalTest; return this; } /** * A diagnostic test or procedure offered by this lab. */ - public Builder availableTest(MedicalTest.Builder medicalTest) { + @NotNull public Builder availableTest(MedicalTest.Builder medicalTest) { return this.availableTest(medicalTest.build()); } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -162,13 +166,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -176,27 +180,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -204,13 +208,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -218,7 +222,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -226,13 +230,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -240,20 +244,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -261,13 +265,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -275,26 +279,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -304,7 +308,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -314,27 +318,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -368,7 +372,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -403,7 +407,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -436,7 +440,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -444,38 +448,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -514,58 +518,58 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder availableTest(MedicalTest medicalTest); - Builder availableTest(MedicalTest.Builder medicalTest); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder availableTest(MedicalTest medicalTest); + @NotNull Builder availableTest(MedicalTest.Builder medicalTest); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DiagnosticLab(MedicalTest availableTest, 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) { diff --git a/src/main/java/org/schema/DiagnosticProcedure.java b/src/main/java/org/schema/DiagnosticProcedure.java index d8f49a2b..6d535eaa 100644 --- a/src/main/java/org/schema/DiagnosticProcedure.java +++ b/src/main/java/org/schema/DiagnosticProcedure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical procedure intended primarily for diagnostic, as opposed to therapeutic, purposes. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class DiagnosticProcedure extends MedicalTest { /** * Builder for {@link DiagnosticProcedure} */ - public static final class DiagnosticProcedureThingBuilder implements Builder { + static final class DiagnosticProcedureThingBuilder implements Builder { /** * Creates new {@link DiagnosticProcedure} instance. */ @@ -36,158 +40,158 @@ public DiagnosticProcedure build() { /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug drug) { + @NotNull public Builder affectedBy(Drug drug) { this.affectedBy = drug; return this; } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug.Builder drug) { + @NotNull public Builder affectedBy(Drug.Builder drug) { return this.affectedBy(drug.build()); } /** * Range of acceptable values for a typical patient, when applicable. */ - public Builder normalRange(String normalRange) { + @NotNull public Builder normalRange(String normalRange) { this.normalRange = normalRange; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign medicalSign) { + @NotNull public Builder signDetected(MedicalSign medicalSign) { this.signDetected = medicalSign; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign.Builder medicalSign) { + @NotNull public Builder signDetected(MedicalSign.Builder medicalSign) { return this.signDetected(medicalSign.build()); } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition medicalCondition) { this.usedToDiagnose = medicalCondition; return this; } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { return this.usedToDiagnose(medicalCondition.build()); } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice medicalDevice) { this.usesDevice = medicalDevice; return this; } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice.Builder medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice.Builder medicalDevice) { return this.usesDevice(medicalDevice.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -221,7 +225,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -256,7 +260,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -289,7 +293,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -297,38 +301,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -357,39 +361,39 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder affectedBy(Drug drug); - Builder affectedBy(Drug.Builder drug); - Builder normalRange(String normalRange); - Builder signDetected(MedicalSign medicalSign); - Builder signDetected(MedicalSign.Builder medicalSign); - Builder usedToDiagnose(MedicalCondition medicalCondition); - Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); - Builder usesDevice(MedicalDevice medicalDevice); - Builder usesDevice(MedicalDevice.Builder medicalDevice); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder affectedBy(Drug drug); + @NotNull Builder affectedBy(Drug.Builder drug); + @NotNull Builder normalRange(String normalRange); + @NotNull Builder signDetected(MedicalSign medicalSign); + @NotNull Builder signDetected(MedicalSign.Builder medicalSign); + @NotNull Builder usedToDiagnose(MedicalCondition medicalCondition); + @NotNull Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); + @NotNull Builder usesDevice(MedicalDevice medicalDevice); + @NotNull Builder usesDevice(MedicalDevice.Builder medicalDevice); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Diet.java b/src/main/java/org/schema/Diet.java index fba9a157..5fa94d65 100644 --- a/src/main/java/org/schema/Diet.java +++ b/src/main/java/org/schema/Diet.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A strategy of regulating the intake of food to achieve or maintain a specific health-related goal. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -68,7 +72,7 @@ public String getRisks() { /** * Builder for {@link Diet} */ - public static final class DietThingBuilder implements Builder { + static final class DietThingBuilder implements Builder { /** * Creates new {@link Diet} instance. */ @@ -78,14 +82,14 @@ public Diet build() { /** * Nutritional information specific to the dietary plan. May include dietary recommendations on what foods to avoid, what foods to consume, and specific alterations/deviations from the USDA or other regulatory body's approved dietary guidelines. */ - public Builder dietFeatures(String dietFeatures) { + @NotNull public Builder dietFeatures(String dietFeatures) { this.dietFeatures = dietFeatures; return this; } /** * People or organizations that endorse the plan. */ - public Builder endorsers(Organization organization) { + @NotNull public Builder endorsers(Organization organization) { if (this.endorsers == null) this.endorsers = new OrganizationOrPerson(); this.endorsers.setOrganization(organization); return this; @@ -93,13 +97,13 @@ public Builder endorsers(Organization organization) { /** * People or organizations that endorse the plan. */ - public Builder endorsers(Organization.Builder organization) { + @NotNull public Builder endorsers(Organization.Builder organization) { return this.endorsers(organization.build()); } /** * People or organizations that endorse the plan. */ - public Builder endorsers(Person person) { + @NotNull public Builder endorsers(Person person) { if (this.endorsers == null) this.endorsers = new OrganizationOrPerson(); this.endorsers.setPerson(person); return this; @@ -107,205 +111,205 @@ public Builder endorsers(Person person) { /** * People or organizations that endorse the plan. */ - public Builder endorsers(Person.Builder person) { + @NotNull public Builder endorsers(Person.Builder person) { return this.endorsers(person.build()); } /** * Medical expert advice related to the plan. */ - public Builder expertConsiderations(String expertConsiderations) { + @NotNull public Builder expertConsiderations(String expertConsiderations) { this.expertConsiderations = expertConsiderations; return this; } /** * Descriptive information establishing the overarching theory/philosophy of the plan. May include the rationale for the name, the population where the plan first came to prominence, etc. */ - public Builder overview(String overview) { + @NotNull public Builder overview(String overview) { this.overview = overview; return this; } /** * Specific physiologic benefits associated to the plan. */ - public Builder physiologicalBenefits(String physiologicalBenefits) { + @NotNull public Builder physiologicalBenefits(String physiologicalBenefits) { this.physiologicalBenefits = physiologicalBenefits; return this; } /** * Proprietary name given to the diet plan, typically by its originator or creator. */ - public Builder proprietaryName(String proprietaryName) { + @NotNull public Builder proprietaryName(String proprietaryName) { this.proprietaryName = proprietaryName; return this; } /** * Specific physiologic risks associated to the plan. */ - public Builder risks(String risks) { + @NotNull public Builder risks(String risks) { this.risks = risks; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -339,7 +343,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -374,7 +378,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -407,7 +411,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -415,38 +419,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -482,50 +486,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder dietFeatures(String dietFeatures); - Builder endorsers(Organization organization); - Builder endorsers(Organization.Builder organization); - Builder endorsers(Person person); - Builder endorsers(Person.Builder person); - Builder expertConsiderations(String expertConsiderations); - Builder overview(String overview); - Builder physiologicalBenefits(String physiologicalBenefits); - Builder proprietaryName(String proprietaryName); - Builder risks(String risks); - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder dietFeatures(String dietFeatures); + @NotNull Builder endorsers(Organization organization); + @NotNull Builder endorsers(Organization.Builder organization); + @NotNull Builder endorsers(Person person); + @NotNull Builder endorsers(Person.Builder person); + @NotNull Builder expertConsiderations(String expertConsiderations); + @NotNull Builder overview(String overview); + @NotNull Builder physiologicalBenefits(String physiologicalBenefits); + @NotNull Builder proprietaryName(String proprietaryName); + @NotNull Builder risks(String risks); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Diet(String dietFeatures, OrganizationOrPerson endorsers, String expertConsiderations, String overview, String physiologicalBenefits, String proprietaryName, String risks, 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) { diff --git a/src/main/java/org/schema/DietNutrition.java b/src/main/java/org/schema/DietNutrition.java index 1c91cca6..dd1ab87a 100644 --- a/src/main/java/org/schema/DietNutrition.java +++ b/src/main/java/org/schema/DietNutrition.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Diet and nutrition. */ @@ -25,7 +29,7 @@ public class DietNutrition { /** * Builder for {@link DietNutrition} */ - public static final class DietNutritionThingBuilder implements Builder { + static final class DietNutritionThingBuilder implements Builder { /** * Creates new {@link DietNutrition} instance. */ @@ -34,7 +38,7 @@ public DietNutrition build() { } } public interface Builder extends ThingBuilder { - + } protected DietNutrition() { diff --git a/src/main/java/org/schema/DietarySupplement.java b/src/main/java/org/schema/DietarySupplement.java index cbf042d5..98fdcf8a 100644 --- a/src/main/java/org/schema/DietarySupplement.java +++ b/src/main/java/org/schema/DietarySupplement.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A product taken by mouth that contains a dietary ingredient intended to supplement the diet. Dietary ingredients may include vitamins, minerals, herbs or other botanicals, amino acids, and substances such as enzymes, organ tissues, glandulars and metabolites. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -98,7 +102,7 @@ public String getTargetPopulation() { /** * Builder for {@link DietarySupplement} */ - public static final class DietarySupplementThingBuilder implements Builder { + static final class DietarySupplementThingBuilder implements Builder { /** * Creates new {@link DietarySupplement} instance. */ @@ -108,272 +112,272 @@ public DietarySupplement build() { /** * An active ingredient, typically chemical compounds and/or biologic substances. */ - public Builder activeIngredient(String activeIngredient) { + @NotNull public Builder activeIngredient(String activeIngredient) { this.activeIngredient = activeIngredient; return this; } /** * Descriptive information establishing a historical perspective on the supplement. May include the rationale for the name, the population where the supplement first came to prominence, etc. */ - public Builder background(String background) { + @NotNull public Builder background(String background) { this.background = background; return this; } /** * A dosage form in which this drug/supplement is available, e.g. 'tablet', 'suspension', 'injection'. */ - public Builder dosageForm(String dosageForm) { + @NotNull public Builder dosageForm(String dosageForm) { this.dosageForm = dosageForm; return this; } /** * True if this item's name is a proprietary/brand name (vs. generic name). */ - public Builder isProprietary(Boolean isProprietary) { + @NotNull public Builder isProprietary(Boolean isProprietary) { this.isProprietary = isProprietary; return this; } /** * The drug or supplement's legal status, including any controlled substance schedules that apply. */ - public Builder legalStatus(DrugLegalStatus drugLegalStatus) { + @NotNull public Builder legalStatus(DrugLegalStatus drugLegalStatus) { this.legalStatus = drugLegalStatus; return this; } /** * The drug or supplement's legal status, including any controlled substance schedules that apply. */ - public Builder legalStatus(DrugLegalStatus.Builder drugLegalStatus) { + @NotNull public Builder legalStatus(DrugLegalStatus.Builder drugLegalStatus) { return this.legalStatus(drugLegalStatus.build()); } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization organization) { + @NotNull public Builder manufacturer(Organization organization) { this.manufacturer = organization; return this; } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization.Builder organization) { + @NotNull public Builder manufacturer(Organization.Builder organization) { return this.manufacturer(organization.build()); } /** * Recommended intake of this supplement for a given population as defined by a specific recommending authority. */ - public Builder maximumIntake(MaximumDoseSchedule maximumDoseSchedule) { + @NotNull public Builder maximumIntake(MaximumDoseSchedule maximumDoseSchedule) { this.maximumIntake = maximumDoseSchedule; return this; } /** * Recommended intake of this supplement for a given population as defined by a specific recommending authority. */ - public Builder maximumIntake(MaximumDoseSchedule.Builder maximumDoseSchedule) { + @NotNull public Builder maximumIntake(MaximumDoseSchedule.Builder maximumDoseSchedule) { return this.maximumIntake(maximumDoseSchedule.build()); } /** * The specific biochemical interaction through which this drug or supplement produces its pharmacological effect. */ - public Builder mechanismOfAction(String mechanismOfAction) { + @NotNull public Builder mechanismOfAction(String mechanismOfAction) { this.mechanismOfAction = mechanismOfAction; return this; } /** * The generic name of this drug or supplement. */ - public Builder nonProprietaryName(String nonProprietaryName) { + @NotNull public Builder nonProprietaryName(String nonProprietaryName) { this.nonProprietaryName = nonProprietaryName; return this; } /** * Recommended intake of this supplement for a given population as defined by a specific recommending authority. */ - public Builder recommendedIntake(RecommendedDoseSchedule recommendedDoseSchedule) { + @NotNull public Builder recommendedIntake(RecommendedDoseSchedule recommendedDoseSchedule) { this.recommendedIntake = recommendedDoseSchedule; return this; } /** * Recommended intake of this supplement for a given population as defined by a specific recommending authority. */ - public Builder recommendedIntake(RecommendedDoseSchedule.Builder recommendedDoseSchedule) { + @NotNull public Builder recommendedIntake(RecommendedDoseSchedule.Builder recommendedDoseSchedule) { return this.recommendedIntake(recommendedDoseSchedule.build()); } /** * Any potential safety concern associated with the supplement. May include interactions with other drugs and foods, pregnancy, breastfeeding, known adverse reactions, and documented efficacy of the supplement. */ - public Builder safetyConsideration(String safetyConsideration) { + @NotNull public Builder safetyConsideration(String safetyConsideration) { this.safetyConsideration = safetyConsideration; return this; } /** * Characteristics of the population for which this is intended, or which typically uses it, e.g. 'adults'. */ - public Builder targetPopulation(String targetPopulation) { + @NotNull public Builder targetPopulation(String targetPopulation) { this.targetPopulation = targetPopulation; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -407,7 +411,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -442,7 +446,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -475,7 +479,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -483,38 +487,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -555,56 +559,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder activeIngredient(String activeIngredient); - Builder background(String background); - Builder dosageForm(String dosageForm); - Builder isProprietary(Boolean isProprietary); - Builder legalStatus(DrugLegalStatus drugLegalStatus); - Builder legalStatus(DrugLegalStatus.Builder drugLegalStatus); - Builder manufacturer(Organization organization); - Builder manufacturer(Organization.Builder organization); - Builder maximumIntake(MaximumDoseSchedule maximumDoseSchedule); - Builder maximumIntake(MaximumDoseSchedule.Builder maximumDoseSchedule); - Builder mechanismOfAction(String mechanismOfAction); - Builder nonProprietaryName(String nonProprietaryName); - Builder recommendedIntake(RecommendedDoseSchedule recommendedDoseSchedule); - Builder recommendedIntake(RecommendedDoseSchedule.Builder recommendedDoseSchedule); - Builder safetyConsideration(String safetyConsideration); - Builder targetPopulation(String targetPopulation); - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder activeIngredient(String activeIngredient); + @NotNull Builder background(String background); + @NotNull Builder dosageForm(String dosageForm); + @NotNull Builder isProprietary(Boolean isProprietary); + @NotNull Builder legalStatus(DrugLegalStatus drugLegalStatus); + @NotNull Builder legalStatus(DrugLegalStatus.Builder drugLegalStatus); + @NotNull Builder manufacturer(Organization organization); + @NotNull Builder manufacturer(Organization.Builder organization); + @NotNull Builder maximumIntake(MaximumDoseSchedule maximumDoseSchedule); + @NotNull Builder maximumIntake(MaximumDoseSchedule.Builder maximumDoseSchedule); + @NotNull Builder mechanismOfAction(String mechanismOfAction); + @NotNull Builder nonProprietaryName(String nonProprietaryName); + @NotNull Builder recommendedIntake(RecommendedDoseSchedule recommendedDoseSchedule); + @NotNull Builder recommendedIntake(RecommendedDoseSchedule.Builder recommendedDoseSchedule); + @NotNull Builder safetyConsideration(String safetyConsideration); + @NotNull Builder targetPopulation(String targetPopulation); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DietarySupplement(String activeIngredient, String background, String dosageForm, Boolean isProprietary, DrugLegalStatus legalStatus, Organization manufacturer, MaximumDoseSchedule maximumIntake, String mechanismOfAction, String nonProprietaryName, RecommendedDoseSchedule recommendedIntake, String safetyConsideration, String targetPopulation, 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) { diff --git a/src/main/java/org/schema/DigitalAudioTapeFormat.java b/src/main/java/org/schema/DigitalAudioTapeFormat.java index 7e504337..cfcd5968 100644 --- a/src/main/java/org/schema/DigitalAudioTapeFormat.java +++ b/src/main/java/org/schema/DigitalAudioTapeFormat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * DigitalAudioTapeFormat. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class DigitalAudioTapeFormat { /** * Builder for {@link DigitalAudioTapeFormat} */ - public static final class DigitalAudioTapeFormatThingBuilder implements Builder { + static final class DigitalAudioTapeFormatThingBuilder implements Builder { /** * Creates new {@link DigitalAudioTapeFormat} instance. */ @@ -35,7 +39,7 @@ public DigitalAudioTapeFormat build() { } } public interface Builder extends ThingBuilder { - + } protected DigitalAudioTapeFormat() { diff --git a/src/main/java/org/schema/DigitalFormat.java b/src/main/java/org/schema/DigitalFormat.java index 979f0ce6..d5695205 100644 --- a/src/main/java/org/schema/DigitalFormat.java +++ b/src/main/java/org/schema/DigitalFormat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * DigitalFormat. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class DigitalFormat { /** * Builder for {@link DigitalFormat} */ - public static final class DigitalFormatThingBuilder implements Builder { + static final class DigitalFormatThingBuilder implements Builder { /** * Creates new {@link DigitalFormat} instance. */ @@ -35,7 +39,7 @@ public DigitalFormat build() { } } public interface Builder extends ThingBuilder { - + } protected DigitalFormat() { diff --git a/src/main/java/org/schema/DisagreeAction.java b/src/main/java/org/schema/DisagreeAction.java index eab89a27..995112ce 100644 --- a/src/main/java/org/schema/DisagreeAction.java +++ b/src/main/java/org/schema/DisagreeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of expressing a difference of opinion with the object. An agent disagrees to/about an object (a proposition, topic or theme) with participants. */ @@ -25,7 +29,7 @@ public class DisagreeAction extends ReactAction { /** * Builder for {@link DisagreeAction} */ - public static final class DisagreeActionThingBuilder implements Builder { + static final class DisagreeActionThingBuilder implements Builder { /** * Creates new {@link DisagreeAction} instance. */ @@ -35,7 +39,7 @@ public DisagreeAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Discontinued.java b/src/main/java/org/schema/Discontinued.java index eb72de28..bb82614b 100644 --- a/src/main/java/org/schema/Discontinued.java +++ b/src/main/java/org/schema/Discontinued.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item has been discontinued. */ @@ -25,7 +29,7 @@ public class Discontinued { /** * Builder for {@link Discontinued} */ - public static final class DiscontinuedThingBuilder implements Builder { + static final class DiscontinuedThingBuilder implements Builder { /** * Creates new {@link Discontinued} instance. */ @@ -34,7 +38,7 @@ public Discontinued build() { } } public interface Builder extends ThingBuilder { - + } protected Discontinued() { diff --git a/src/main/java/org/schema/DiscoverAction.java b/src/main/java/org/schema/DiscoverAction.java index d8ca7dbe..d085c690 100644 --- a/src/main/java/org/schema/DiscoverAction.java +++ b/src/main/java/org/schema/DiscoverAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of discovering/finding an object. */ @@ -25,7 +29,7 @@ public class DiscoverAction extends FindAction { /** * Builder for {@link DiscoverAction} */ - public static final class DiscoverActionThingBuilder implements Builder { + static final class DiscoverActionThingBuilder implements Builder { /** * Creates new {@link DiscoverAction} instance. */ @@ -35,7 +39,7 @@ public DiscoverAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DislikeAction.java b/src/main/java/org/schema/DislikeAction.java index d93dc73e..d49e83b4 100644 --- a/src/main/java/org/schema/DislikeAction.java +++ b/src/main/java/org/schema/DislikeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of expressing a negative sentiment about the object. An agent dislikes an object (a proposition, topic or theme) with participants. */ @@ -25,7 +29,7 @@ public class DislikeAction extends ReactAction { /** * Builder for {@link DislikeAction} */ - public static final class DislikeActionThingBuilder implements Builder { + static final class DislikeActionThingBuilder implements Builder { /** * Creates new {@link DislikeAction} instance. */ @@ -35,7 +39,7 @@ public DislikeAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Distance.java b/src/main/java/org/schema/Distance.java index 2c48e614..fc363574 100644 --- a/src/main/java/org/schema/Distance.java +++ b/src/main/java/org/schema/Distance.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Properties that take Distances as values are of the form '<Number> <Length unit of measure>'. E.g., '7 ft'. */ @@ -25,7 +29,7 @@ public class Distance extends Quantity { /** * Builder for {@link Distance} */ - public static final class DistanceThingBuilder implements Builder { + static final class DistanceThingBuilder implements Builder { /** * Creates new {@link Distance} instance. */ @@ -35,21 +39,21 @@ public Distance build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Distance(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/DistanceOrQuantitativeValue.java b/src/main/java/org/schema/DistanceOrQuantitativeValue.java index a60a26fe..41952c56 100644 --- a/src/main/java/org/schema/DistanceOrQuantitativeValue.java +++ b/src/main/java/org/schema/DistanceOrQuantitativeValue.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class DistanceOrQuantitativeValue { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myDistance != null) return myDistance; if (myQuantitativeValue != null) return myQuantitativeValue; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setDistance(Distance distance) { clear(); myDistance = distance; } public Distance getDistance() { return myDistance; } - private Distance myDistance; public void setQuantitativeValue(QuantitativeValue quantitativeValue) { clear(); myQuantitativeValue = quantitativeValue; } public QuantitativeValue getQuantitativeValue() { return myQuantitativeValue; } + private Distance myDistance; private QuantitativeValue myQuantitativeValue; private void clear() { myDistance = null; diff --git a/src/main/java/org/schema/DistanceOrString.java b/src/main/java/org/schema/DistanceOrString.java index 921c1af1..dfdcfce1 100644 --- a/src/main/java/org/schema/DistanceOrString.java +++ b/src/main/java/org/schema/DistanceOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class DistanceOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myDistance != null) return myDistance; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setDistance(Distance distance) { clear(); myDistance = distance; } public Distance getDistance() { return myDistance; } - private Distance myDistance; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private Distance myDistance; private String myString; private void clear() { myDistance = null; diff --git a/src/main/java/org/schema/DonateAction.java b/src/main/java/org/schema/DonateAction.java index cb3c3a3a..6a7a4dcb 100644 --- a/src/main/java/org/schema/DonateAction.java +++ b/src/main/java/org/schema/DonateAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of providing goods, services, or money without compensation, often for philanthropic reasons. */ @@ -31,7 +35,7 @@ public AudienceOrOrganizationOrPerson getRecipient() { /** * Builder for {@link DonateAction} */ - public static final class DonateActionThingBuilder implements Builder { + static final class DonateActionThingBuilder implements Builder { /** * Creates new {@link DonateAction} instance. */ @@ -41,7 +45,7 @@ public DonateAction build() { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -49,13 +53,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -63,13 +67,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -77,7 +81,7 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** @@ -103,7 +107,7 @@ public Builder recipient(Person.Builder person) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -131,7 +135,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -139,20 +143,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -160,13 +164,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -174,7 +178,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -182,7 +186,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -191,67 +195,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -285,7 +289,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -320,7 +324,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -353,7 +357,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -361,38 +365,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -419,40 +423,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/DoseSchedule.java b/src/main/java/org/schema/DoseSchedule.java index c0ebd622..8c31edde 100644 --- a/src/main/java/org/schema/DoseSchedule.java +++ b/src/main/java/org/schema/DoseSchedule.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific dosing schedule for a drug or supplement. */ @@ -49,7 +53,7 @@ public String getTargetPopulation() { /** * Builder for {@link DoseSchedule} */ - public static final class DoseScheduleThingBuilder implements Builder { + static final class DoseScheduleThingBuilder implements Builder { /** * Creates new {@link DoseSchedule} instance. */ @@ -59,22 +63,22 @@ public DoseSchedule build() { /** * The unit of the dose, e.g. 'mg'. */ - public Builder doseUnit(String doseUnit) { + @NotNull public Builder doseUnit(String doseUnit) { this.doseUnit = doseUnit; return this; } /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Integer integer) { + @NotNull public Builder doseValue(int doseValue) { if (this.doseValue == null) this.doseValue = new Number(); - this.doseValue.setInteger(integer); + this.doseValue.setInt(doseValue); return this; } /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Long doseValue) { + @NotNull public Builder doseValue(long doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setLong(doseValue); return this; @@ -82,7 +86,7 @@ public Builder doseValue(Long doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Float doseValue) { + @NotNull public Builder doseValue(float doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setFloat(doseValue); return this; @@ -90,7 +94,7 @@ public Builder doseValue(Float doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Double doseValue) { + @NotNull public Builder doseValue(double doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setDouble(doseValue); return this; @@ -98,7 +102,7 @@ public Builder doseValue(Double doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(String doseValue) { + @NotNull public Builder doseValue(String doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setString(doseValue); return this; @@ -106,113 +110,113 @@ public Builder doseValue(String doseValue) { /** * How often the dose is taken, e.g. 'daily'. */ - public Builder frequency(String frequency) { + @NotNull public Builder frequency(String frequency) { this.frequency = frequency; return this; } /** * Characteristics of the population for which this is intended, or which typically uses it, e.g. 'adults'. */ - public Builder targetPopulation(String targetPopulation) { + @NotNull public Builder targetPopulation(String targetPopulation) { this.targetPopulation = targetPopulation; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -246,7 +250,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -281,7 +285,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -314,7 +318,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -322,38 +326,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -381,38 +385,38 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder doseUnit(String doseUnit); - Builder doseValue(Integer integer); - Builder doseValue(Long doseValue); - Builder doseValue(Float doseValue); - Builder doseValue(Double doseValue); - Builder doseValue(String doseValue); - Builder frequency(String frequency); - Builder targetPopulation(String targetPopulation); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder doseUnit(String doseUnit); + @NotNull Builder doseValue(int doseValue); + @NotNull Builder doseValue(long doseValue); + @NotNull Builder doseValue(float doseValue); + @NotNull Builder doseValue(double doseValue); + @NotNull Builder doseValue(String doseValue); + @NotNull Builder frequency(String frequency); + @NotNull Builder targetPopulation(String targetPopulation); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DoseSchedule(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) { diff --git a/src/main/java/org/schema/DoubleBlindedTrial.java b/src/main/java/org/schema/DoubleBlindedTrial.java index c0886a6e..be0805ac 100644 --- a/src/main/java/org/schema/DoubleBlindedTrial.java +++ b/src/main/java/org/schema/DoubleBlindedTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A trial design in which neither the researcher nor the patient knows the details of the treatment the patient was randomly assigned to. */ @@ -25,7 +29,7 @@ public class DoubleBlindedTrial { /** * Builder for {@link DoubleBlindedTrial} */ - public static final class DoubleBlindedTrialThingBuilder implements Builder { + static final class DoubleBlindedTrialThingBuilder implements Builder { /** * Creates new {@link DoubleBlindedTrial} instance. */ @@ -34,7 +38,7 @@ public DoubleBlindedTrial build() { } } public interface Builder extends ThingBuilder { - + } protected DoubleBlindedTrial() { diff --git a/src/main/java/org/schema/DownloadAction.java b/src/main/java/org/schema/DownloadAction.java index e1662e97..69094e6e 100644 --- a/src/main/java/org/schema/DownloadAction.java +++ b/src/main/java/org/schema/DownloadAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of downloading an object. */ @@ -25,7 +29,7 @@ public class DownloadAction extends TransferAction { /** * Builder for {@link DownloadAction} */ - public static final class DownloadActionThingBuilder implements Builder { + static final class DownloadActionThingBuilder implements Builder { /** * Creates new {@link DownloadAction} instance. */ @@ -35,33 +39,33 @@ public DownloadAction build() { /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -69,13 +73,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -83,7 +87,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -91,7 +95,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -100,67 +104,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -194,7 +198,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -229,7 +233,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -270,38 +274,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -327,34 +331,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DrawAction.java b/src/main/java/org/schema/DrawAction.java index 0c7be93f..0b7bcf7f 100644 --- a/src/main/java/org/schema/DrawAction.java +++ b/src/main/java/org/schema/DrawAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of producing a visual/graphical representation of an object, typically with a pen/pencil and paper as instruments. */ @@ -25,7 +29,7 @@ public class DrawAction extends CreateAction { /** * Builder for {@link DrawAction} */ - public static final class DrawActionThingBuilder implements Builder { + static final class DrawActionThingBuilder implements Builder { /** * Creates new {@link DrawAction} instance. */ @@ -35,7 +39,7 @@ public DrawAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DrinkAction.java b/src/main/java/org/schema/DrinkAction.java index 41bd550f..ab755f4c 100644 --- a/src/main/java/org/schema/DrinkAction.java +++ b/src/main/java/org/schema/DrinkAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of swallowing liquids. */ @@ -25,7 +29,7 @@ public class DrinkAction extends ConsumeAction { /** * Builder for {@link DrinkAction} */ - public static final class DrinkActionThingBuilder implements Builder { + static final class DrinkActionThingBuilder implements Builder { /** * Creates new {@link DrinkAction} instance. */ @@ -35,20 +39,20 @@ public DrinkAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DriveWheelConfigurationValue.java b/src/main/java/org/schema/DriveWheelConfigurationValue.java index 2bb545f2..9a7e80d0 100644 --- a/src/main/java/org/schema/DriveWheelConfigurationValue.java +++ b/src/main/java/org/schema/DriveWheelConfigurationValue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A value indicating which roadwheels will receive torque. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class DriveWheelConfigurationValue extends QualitativeValue { /** * Builder for {@link DriveWheelConfigurationValue} */ - public static final class DriveWheelConfigurationValueThingBuilder implements Builder { + static final class DriveWheelConfigurationValueThingBuilder implements Builder { /** * Creates new {@link DriveWheelConfigurationValue} instance. */ @@ -36,85 +40,85 @@ public DriveWheelConfigurationValue build() { /** * This ordering relation for qualitative values indicates that the subject is equal to the object. */ - public Builder equal(QualitativeValue qualitativeValue) { + @NotNull public Builder equal(QualitativeValue qualitativeValue) { this.equal = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is equal to the object. */ - public Builder equal(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder equal(QualitativeValue.Builder qualitativeValue) { return this.equal(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is greater than the object. */ - public Builder greater(QualitativeValue qualitativeValue) { + @NotNull public Builder greater(QualitativeValue qualitativeValue) { this.greater = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is greater than the object. */ - public Builder greater(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder greater(QualitativeValue.Builder qualitativeValue) { return this.greater(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is greater than or equal to the object. */ - public Builder greaterOrEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder greaterOrEqual(QualitativeValue qualitativeValue) { this.greaterOrEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is greater than or equal to the object. */ - public Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue) { return this.greaterOrEqual(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is lesser than the object. */ - public Builder lesser(QualitativeValue qualitativeValue) { + @NotNull public Builder lesser(QualitativeValue qualitativeValue) { this.lesser = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is lesser than the object. */ - public Builder lesser(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lesser(QualitativeValue.Builder qualitativeValue) { return this.lesser(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object. */ - public Builder lesserOrEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder lesserOrEqual(QualitativeValue qualitativeValue) { this.lesserOrEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object. */ - public Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue) { return this.lesserOrEqual(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is not equal to the object. */ - public Builder nonEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder nonEqual(QualitativeValue qualitativeValue) { this.nonEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is not equal to the object. */ - public Builder nonEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder nonEqual(QualitativeValue.Builder qualitativeValue) { return this.nonEqual(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration enumeration) { + @NotNull public Builder valueReference(Enumeration enumeration) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setEnumeration(enumeration); return this; @@ -122,13 +126,13 @@ public Builder valueReference(Enumeration enumeration) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration.Builder enumeration) { + @NotNull public Builder valueReference(Enumeration.Builder enumeration) { return this.valueReference(enumeration.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue propertyValue) { + @NotNull public Builder valueReference(PropertyValue propertyValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setPropertyValue(propertyValue); return this; @@ -136,13 +140,13 @@ public Builder valueReference(PropertyValue propertyValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue.Builder propertyValue) { + @NotNull public Builder valueReference(PropertyValue.Builder propertyValue) { return this.valueReference(propertyValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue qualitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQualitativeValue(qualitativeValue); return this; @@ -150,13 +154,13 @@ public Builder valueReference(QualitativeValue qualitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue.Builder qualitativeValue) { return this.valueReference(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue quantitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQuantitativeValue(quantitativeValue); return this; @@ -164,13 +168,13 @@ public Builder valueReference(QuantitativeValue quantitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { return this.valueReference(quantitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue structuredValue) { + @NotNull public Builder valueReference(StructuredValue structuredValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setStructuredValue(structuredValue); return this; @@ -178,7 +182,7 @@ public Builder valueReference(StructuredValue structuredValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue.Builder structuredValue) { + @NotNull public Builder valueReference(StructuredValue.Builder structuredValue) { return this.valueReference(structuredValue.build()); } /** @@ -187,7 +191,7 @@ public Builder valueReference(StructuredValue.Builder structuredValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -197,13 +201,13 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -211,13 +215,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -225,27 +229,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -279,7 +283,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -314,7 +318,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -347,7 +351,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -355,38 +359,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -413,46 +417,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder equal(QualitativeValue qualitativeValue); - Builder equal(QualitativeValue.Builder qualitativeValue); - Builder greater(QualitativeValue qualitativeValue); - Builder greater(QualitativeValue.Builder qualitativeValue); - Builder greaterOrEqual(QualitativeValue qualitativeValue); - Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue); - Builder lesser(QualitativeValue qualitativeValue); - Builder lesser(QualitativeValue.Builder qualitativeValue); - Builder lesserOrEqual(QualitativeValue qualitativeValue); - Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue); - Builder nonEqual(QualitativeValue qualitativeValue); - Builder nonEqual(QualitativeValue.Builder qualitativeValue); - Builder valueReference(Enumeration enumeration); - Builder valueReference(Enumeration.Builder enumeration); - Builder valueReference(PropertyValue propertyValue); - Builder valueReference(PropertyValue.Builder propertyValue); - Builder valueReference(QualitativeValue qualitativeValue); - Builder valueReference(QualitativeValue.Builder qualitativeValue); - Builder valueReference(QuantitativeValue quantitativeValue); - Builder valueReference(QuantitativeValue.Builder quantitativeValue); - Builder valueReference(StructuredValue structuredValue); - Builder valueReference(StructuredValue.Builder structuredValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder equal(QualitativeValue qualitativeValue); + @NotNull Builder equal(QualitativeValue.Builder qualitativeValue); + @NotNull Builder greater(QualitativeValue qualitativeValue); + @NotNull Builder greater(QualitativeValue.Builder qualitativeValue); + @NotNull Builder greaterOrEqual(QualitativeValue qualitativeValue); + @NotNull Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lesser(QualitativeValue qualitativeValue); + @NotNull Builder lesser(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lesserOrEqual(QualitativeValue qualitativeValue); + @NotNull Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder nonEqual(QualitativeValue qualitativeValue); + @NotNull Builder nonEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(Enumeration enumeration); + @NotNull Builder valueReference(Enumeration.Builder enumeration); + @NotNull Builder valueReference(PropertyValue propertyValue); + @NotNull Builder valueReference(PropertyValue.Builder propertyValue); + @NotNull Builder valueReference(QualitativeValue qualitativeValue); + @NotNull Builder valueReference(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(QuantitativeValue quantitativeValue); + @NotNull Builder valueReference(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder valueReference(StructuredValue structuredValue); + @NotNull Builder valueReference(StructuredValue.Builder structuredValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/DriveWheelConfigurationValueOrString.java b/src/main/java/org/schema/DriveWheelConfigurationValueOrString.java index 663e114f..3d0fbaf9 100644 --- a/src/main/java/org/schema/DriveWheelConfigurationValueOrString.java +++ b/src/main/java/org/schema/DriveWheelConfigurationValueOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class DriveWheelConfigurationValueOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myDriveWheelConfigurationValue != null) return myDriveWheelConfigurationValue; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setDriveWheelConfigurationValue(DriveWheelConfigurationValue driveWheelConfigurationValue) { clear(); myDriveWheelConfigurationValue = driveWheelConfigurationValue; } public DriveWheelConfigurationValue getDriveWheelConfigurationValue() { return myDriveWheelConfigurationValue; } - private DriveWheelConfigurationValue myDriveWheelConfigurationValue; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private DriveWheelConfigurationValue myDriveWheelConfigurationValue; private String myString; private void clear() { myDriveWheelConfigurationValue = null; diff --git a/src/main/java/org/schema/DrivingSchoolVehicleUsage.java b/src/main/java/org/schema/DrivingSchoolVehicleUsage.java index 2c49b3be..6166c65f 100644 --- a/src/main/java/org/schema/DrivingSchoolVehicleUsage.java +++ b/src/main/java/org/schema/DrivingSchoolVehicleUsage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates the usage of the vehicle for driving school. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class DrivingSchoolVehicleUsage { /** * Builder for {@link DrivingSchoolVehicleUsage} */ - public static final class DrivingSchoolVehicleUsageThingBuilder implements Builder { + static final class DrivingSchoolVehicleUsageThingBuilder implements Builder { /** * Creates new {@link DrivingSchoolVehicleUsage} instance. */ @@ -35,7 +39,7 @@ public DrivingSchoolVehicleUsage build() { } } public interface Builder extends ThingBuilder { - + } protected DrivingSchoolVehicleUsage() { diff --git a/src/main/java/org/schema/Drug.java b/src/main/java/org/schema/Drug.java index 17c3479e..f0c2af7e 100644 --- a/src/main/java/org/schema/Drug.java +++ b/src/main/java/org/schema/Drug.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A chemical or biologic substance, used as a medical therapy, that has a physiological effect on an organism. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -182,7 +186,7 @@ public String getWarning() { /** * Builder for {@link Drug} */ - public static final class DrugThingBuilder implements Builder { + static final class DrugThingBuilder implements Builder { /** * Creates new {@link Drug} instance. */ @@ -192,406 +196,406 @@ public Drug build() { /** * An active ingredient, typically chemical compounds and/or biologic substances. */ - public Builder activeIngredient(String activeIngredient) { + @NotNull public Builder activeIngredient(String activeIngredient) { this.activeIngredient = activeIngredient; return this; } /** * A route by which this drug may be administered, e.g. 'oral'. */ - public Builder administrationRoute(String administrationRoute) { + @NotNull public Builder administrationRoute(String administrationRoute) { this.administrationRoute = administrationRoute; return this; } /** * Any precaution, guidance, contraindication, etc. related to consumption of alcohol while taking this drug. */ - public Builder alcoholWarning(String alcoholWarning) { + @NotNull public Builder alcoholWarning(String alcoholWarning) { this.alcoholWarning = alcoholWarning; return this; } /** * An available dosage strength for the drug. */ - public Builder availableStrength(DrugStrength drugStrength) { + @NotNull public Builder availableStrength(DrugStrength drugStrength) { this.availableStrength = drugStrength; return this; } /** * An available dosage strength for the drug. */ - public Builder availableStrength(DrugStrength.Builder drugStrength) { + @NotNull public Builder availableStrength(DrugStrength.Builder drugStrength) { return this.availableStrength(drugStrength.build()); } /** * Any precaution, guidance, contraindication, etc. related to this drug's use by breastfeeding mothers. */ - public Builder breastfeedingWarning(String breastfeedingWarning) { + @NotNull public Builder breastfeedingWarning(String breastfeedingWarning) { this.breastfeedingWarning = breastfeedingWarning; return this; } /** * Description of the absorption and elimination of drugs, including their concentration (pharmacokinetics, pK) and biological effects (pharmacodynamics, pD). */ - public Builder clinicalPharmacology(String clinicalPharmacology) { + @NotNull public Builder clinicalPharmacology(String clinicalPharmacology) { this.clinicalPharmacology = clinicalPharmacology; return this; } /** * Cost per unit of the drug, as reported by the source being tagged. */ - public Builder cost(DrugCost drugCost) { + @NotNull public Builder cost(DrugCost drugCost) { this.cost = drugCost; return this; } /** * Cost per unit of the drug, as reported by the source being tagged. */ - public Builder cost(DrugCost.Builder drugCost) { + @NotNull public Builder cost(DrugCost.Builder drugCost) { return this.cost(drugCost.build()); } /** * A dosage form in which this drug/supplement is available, e.g. 'tablet', 'suspension', 'injection'. */ - public Builder dosageForm(String dosageForm) { + @NotNull public Builder dosageForm(String dosageForm) { this.dosageForm = dosageForm; return this; } /** * A dosing schedule for the drug for a given population, either observed, recommended, or maximum dose based on the type used. */ - public Builder doseSchedule(DoseSchedule doseSchedule) { + @NotNull public Builder doseSchedule(DoseSchedule doseSchedule) { this.doseSchedule = doseSchedule; return this; } /** * A dosing schedule for the drug for a given population, either observed, recommended, or maximum dose based on the type used. */ - public Builder doseSchedule(DoseSchedule.Builder doseSchedule) { + @NotNull public Builder doseSchedule(DoseSchedule.Builder doseSchedule) { return this.doseSchedule(doseSchedule.build()); } /** * The class of drug this belongs to (e.g., statins). */ - public Builder drugClass(DrugClass drugClass) { + @NotNull public Builder drugClass(DrugClass drugClass) { this.drugClass = drugClass; return this; } /** * The class of drug this belongs to (e.g., statins). */ - public Builder drugClass(DrugClass.Builder drugClass) { + @NotNull public Builder drugClass(DrugClass.Builder drugClass) { return this.drugClass(drugClass.build()); } /** * Any precaution, guidance, contraindication, etc. related to consumption of specific foods while taking this drug. */ - public Builder foodWarning(String foodWarning) { + @NotNull public Builder foodWarning(String foodWarning) { this.foodWarning = foodWarning; return this; } /** * Another drug that is known to interact with this drug in a way that impacts the effect of this drug or causes a risk to the patient. Note: disease interactions are typically captured as contraindications. */ - public Builder interactingDrug(Drug drug) { + @NotNull public Builder interactingDrug(Drug drug) { this.interactingDrug = drug; return this; } /** * Another drug that is known to interact with this drug in a way that impacts the effect of this drug or causes a risk to the patient. Note: disease interactions are typically captured as contraindications. */ - public Builder interactingDrug(Drug.Builder drug) { + @NotNull public Builder interactingDrug(Drug.Builder drug) { return this.interactingDrug(drug.build()); } /** * True if the drug is available in a generic form (regardless of name). */ - public Builder isAvailableGenerically(Boolean isAvailableGenerically) { + @NotNull public Builder isAvailableGenerically(Boolean isAvailableGenerically) { this.isAvailableGenerically = isAvailableGenerically; return this; } /** * True if this item's name is a proprietary/brand name (vs. generic name). */ - public Builder isProprietary(Boolean isProprietary) { + @NotNull public Builder isProprietary(Boolean isProprietary) { this.isProprietary = isProprietary; return this; } /** * Link to the drug's label details. */ - public Builder labelDetails(String labelDetails) { + @NotNull public Builder labelDetails(String labelDetails) { this.labelDetails = labelDetails; return this; } /** * The drug or supplement's legal status, including any controlled substance schedules that apply. */ - public Builder legalStatus(DrugLegalStatus drugLegalStatus) { + @NotNull public Builder legalStatus(DrugLegalStatus drugLegalStatus) { this.legalStatus = drugLegalStatus; return this; } /** * The drug or supplement's legal status, including any controlled substance schedules that apply. */ - public Builder legalStatus(DrugLegalStatus.Builder drugLegalStatus) { + @NotNull public Builder legalStatus(DrugLegalStatus.Builder drugLegalStatus) { return this.legalStatus(drugLegalStatus.build()); } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization organization) { + @NotNull public Builder manufacturer(Organization organization) { this.manufacturer = organization; return this; } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization.Builder organization) { + @NotNull public Builder manufacturer(Organization.Builder organization) { return this.manufacturer(organization.build()); } /** * The specific biochemical interaction through which this drug or supplement produces its pharmacological effect. */ - public Builder mechanismOfAction(String mechanismOfAction) { + @NotNull public Builder mechanismOfAction(String mechanismOfAction) { this.mechanismOfAction = mechanismOfAction; return this; } /** * The generic name of this drug or supplement. */ - public Builder nonProprietaryName(String nonProprietaryName) { + @NotNull public Builder nonProprietaryName(String nonProprietaryName) { this.nonProprietaryName = nonProprietaryName; return this; } /** * Any information related to overdose on a drug, including signs or symptoms, treatments, contact information for emergency response. */ - public Builder overdosage(String overdosage) { + @NotNull public Builder overdosage(String overdosage) { this.overdosage = overdosage; return this; } /** * Pregnancy category of this drug. */ - public Builder pregnancyCategory(DrugPregnancyCategory drugPregnancyCategory) { + @NotNull public Builder pregnancyCategory(DrugPregnancyCategory drugPregnancyCategory) { this.pregnancyCategory = drugPregnancyCategory; return this; } /** * Pregnancy category of this drug. */ - public Builder pregnancyCategory(DrugPregnancyCategory.Builder drugPregnancyCategory) { + @NotNull public Builder pregnancyCategory(DrugPregnancyCategory.Builder drugPregnancyCategory) { return this.pregnancyCategory(drugPregnancyCategory.build()); } /** * Any precaution, guidance, contraindication, etc. related to this drug's use during pregnancy. */ - public Builder pregnancyWarning(String pregnancyWarning) { + @NotNull public Builder pregnancyWarning(String pregnancyWarning) { this.pregnancyWarning = pregnancyWarning; return this; } /** * Link to prescribing information for the drug. */ - public Builder prescribingInfo(String prescribingInfo) { + @NotNull public Builder prescribingInfo(String prescribingInfo) { this.prescribingInfo = prescribingInfo; return this; } /** * Indicates whether this drug is available by prescription or over-the-counter. */ - public Builder prescriptionStatus(DrugPrescriptionStatus drugPrescriptionStatus) { + @NotNull public Builder prescriptionStatus(DrugPrescriptionStatus drugPrescriptionStatus) { this.prescriptionStatus = drugPrescriptionStatus; return this; } /** * Indicates whether this drug is available by prescription or over-the-counter. */ - public Builder prescriptionStatus(DrugPrescriptionStatus.Builder drugPrescriptionStatus) { + @NotNull public Builder prescriptionStatus(DrugPrescriptionStatus.Builder drugPrescriptionStatus) { return this.prescriptionStatus(drugPrescriptionStatus.build()); } /** * Any other drug related to this one, for example commonly-prescribed alternatives. */ - public Builder relatedDrug(Drug drug) { + @NotNull public Builder relatedDrug(Drug drug) { this.relatedDrug = drug; return this; } /** * Any other drug related to this one, for example commonly-prescribed alternatives. */ - public Builder relatedDrug(Drug.Builder drug) { + @NotNull public Builder relatedDrug(Drug.Builder drug) { return this.relatedDrug(drug.build()); } /** * Any FDA or other warnings about the drug (text or URL). */ - public Builder warning(String warning) { + @NotNull public Builder warning(String warning) { this.warning = warning; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -625,7 +629,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -660,7 +664,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -693,7 +697,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -701,38 +705,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -787,76 +791,76 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder activeIngredient(String activeIngredient); - Builder administrationRoute(String administrationRoute); - Builder alcoholWarning(String alcoholWarning); - Builder availableStrength(DrugStrength drugStrength); - Builder availableStrength(DrugStrength.Builder drugStrength); - Builder breastfeedingWarning(String breastfeedingWarning); - Builder clinicalPharmacology(String clinicalPharmacology); - Builder cost(DrugCost drugCost); - Builder cost(DrugCost.Builder drugCost); - Builder dosageForm(String dosageForm); - Builder doseSchedule(DoseSchedule doseSchedule); - Builder doseSchedule(DoseSchedule.Builder doseSchedule); - Builder drugClass(DrugClass drugClass); - Builder drugClass(DrugClass.Builder drugClass); - Builder foodWarning(String foodWarning); - Builder interactingDrug(Drug drug); - Builder interactingDrug(Drug.Builder drug); - Builder isAvailableGenerically(Boolean isAvailableGenerically); - Builder isProprietary(Boolean isProprietary); - Builder labelDetails(String labelDetails); - Builder legalStatus(DrugLegalStatus drugLegalStatus); - Builder legalStatus(DrugLegalStatus.Builder drugLegalStatus); - Builder manufacturer(Organization organization); - Builder manufacturer(Organization.Builder organization); - Builder mechanismOfAction(String mechanismOfAction); - Builder nonProprietaryName(String nonProprietaryName); - Builder overdosage(String overdosage); - Builder pregnancyCategory(DrugPregnancyCategory drugPregnancyCategory); - Builder pregnancyCategory(DrugPregnancyCategory.Builder drugPregnancyCategory); - Builder pregnancyWarning(String pregnancyWarning); - Builder prescribingInfo(String prescribingInfo); - Builder prescriptionStatus(DrugPrescriptionStatus drugPrescriptionStatus); - Builder prescriptionStatus(DrugPrescriptionStatus.Builder drugPrescriptionStatus); - Builder relatedDrug(Drug drug); - Builder relatedDrug(Drug.Builder drug); - Builder warning(String warning); - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder activeIngredient(String activeIngredient); + @NotNull Builder administrationRoute(String administrationRoute); + @NotNull Builder alcoholWarning(String alcoholWarning); + @NotNull Builder availableStrength(DrugStrength drugStrength); + @NotNull Builder availableStrength(DrugStrength.Builder drugStrength); + @NotNull Builder breastfeedingWarning(String breastfeedingWarning); + @NotNull Builder clinicalPharmacology(String clinicalPharmacology); + @NotNull Builder cost(DrugCost drugCost); + @NotNull Builder cost(DrugCost.Builder drugCost); + @NotNull Builder dosageForm(String dosageForm); + @NotNull Builder doseSchedule(DoseSchedule doseSchedule); + @NotNull Builder doseSchedule(DoseSchedule.Builder doseSchedule); + @NotNull Builder drugClass(DrugClass drugClass); + @NotNull Builder drugClass(DrugClass.Builder drugClass); + @NotNull Builder foodWarning(String foodWarning); + @NotNull Builder interactingDrug(Drug drug); + @NotNull Builder interactingDrug(Drug.Builder drug); + @NotNull Builder isAvailableGenerically(Boolean isAvailableGenerically); + @NotNull Builder isProprietary(Boolean isProprietary); + @NotNull Builder labelDetails(String labelDetails); + @NotNull Builder legalStatus(DrugLegalStatus drugLegalStatus); + @NotNull Builder legalStatus(DrugLegalStatus.Builder drugLegalStatus); + @NotNull Builder manufacturer(Organization organization); + @NotNull Builder manufacturer(Organization.Builder organization); + @NotNull Builder mechanismOfAction(String mechanismOfAction); + @NotNull Builder nonProprietaryName(String nonProprietaryName); + @NotNull Builder overdosage(String overdosage); + @NotNull Builder pregnancyCategory(DrugPregnancyCategory drugPregnancyCategory); + @NotNull Builder pregnancyCategory(DrugPregnancyCategory.Builder drugPregnancyCategory); + @NotNull Builder pregnancyWarning(String pregnancyWarning); + @NotNull Builder prescribingInfo(String prescribingInfo); + @NotNull Builder prescriptionStatus(DrugPrescriptionStatus drugPrescriptionStatus); + @NotNull Builder prescriptionStatus(DrugPrescriptionStatus.Builder drugPrescriptionStatus); + @NotNull Builder relatedDrug(Drug drug); + @NotNull Builder relatedDrug(Drug.Builder drug); + @NotNull Builder warning(String warning); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Drug(String activeIngredient, String administrationRoute, String alcoholWarning, DrugStrength availableStrength, String breastfeedingWarning, String clinicalPharmacology, DrugCost cost, String dosageForm, DoseSchedule doseSchedule, DrugClass drugClass, String foodWarning, Drug interactingDrug, Boolean isAvailableGenerically, Boolean isProprietary, String labelDetails, DrugLegalStatus legalStatus, Organization manufacturer, String mechanismOfAction, String nonProprietaryName, String overdosage, DrugPregnancyCategory pregnancyCategory, String pregnancyWarning, String prescribingInfo, DrugPrescriptionStatus prescriptionStatus, Drug relatedDrug, String warning, 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) { diff --git a/src/main/java/org/schema/DrugClass.java b/src/main/java/org/schema/DrugClass.java index 902e1cdb..514f904c 100644 --- a/src/main/java/org/schema/DrugClass.java +++ b/src/main/java/org/schema/DrugClass.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A class of medical drugs, e.g., statins. Classes can represent general pharmacological class, common mechanisms of action, common physiological effects, etc. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public Drug getDrug() { /** * Builder for {@link DrugClass} */ - public static final class DrugClassThingBuilder implements Builder { + static final class DrugClassThingBuilder implements Builder { /** * Creates new {@link DrugClass} instance. */ @@ -42,177 +46,177 @@ public DrugClass build() { /** * A drug in this drug class. */ - public Builder drug(Drug drug) { + @NotNull public Builder drug(Drug drug) { this.drug = drug; return this; } /** * A drug in this drug class. */ - public Builder drug(Drug.Builder drug) { + @NotNull public Builder drug(Drug.Builder drug) { return this.drug(drug.build()); } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -246,7 +250,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -281,7 +285,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -314,7 +318,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -322,38 +326,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -383,42 +387,42 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder drug(Drug drug); - Builder drug(Drug.Builder drug); - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder drug(Drug drug); + @NotNull Builder drug(Drug.Builder drug); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DrugClass(Drug drug, 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) { diff --git a/src/main/java/org/schema/DrugCost.java b/src/main/java/org/schema/DrugCost.java index 2f4c3a94..6ab3ed7e 100644 --- a/src/main/java/org/schema/DrugCost.java +++ b/src/main/java/org/schema/DrugCost.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The cost per unit of a medical drug. Note that this type is not meant to represent the price in an offer of a drug for sale; see the Offer type for that. This type will typically be used to tag wholesale or average retail cost of a drug, or maximum reimbursable cost. Costs of medical drugs vary widely depending on how and where they are paid for, so while this type captures some of the variables, costs should be used with caution by consumers of this schema's markup. */ @@ -61,7 +65,7 @@ public String getDrugUnit() { /** * Builder for {@link DrugCost} */ - public static final class DrugCostThingBuilder implements Builder { + static final class DrugCostThingBuilder implements Builder { /** * Creates new {@link DrugCost} instance. */ @@ -71,47 +75,47 @@ public DrugCost build() { /** * The location in which the status applies. */ - public Builder applicableLocation(AdministrativeArea administrativeArea) { + @NotNull public Builder applicableLocation(AdministrativeArea administrativeArea) { this.applicableLocation = administrativeArea; return this; } /** * The location in which the status applies. */ - public Builder applicableLocation(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder applicableLocation(AdministrativeArea.Builder administrativeArea) { return this.applicableLocation(administrativeArea.build()); } /** * The category of cost, such as wholesale, retail, reimbursement cap, etc. */ - public Builder costCategory(DrugCostCategory drugCostCategory) { + @NotNull public Builder costCategory(DrugCostCategory drugCostCategory) { this.costCategory = drugCostCategory; return this; } /** * The category of cost, such as wholesale, retail, reimbursement cap, etc. */ - public Builder costCategory(DrugCostCategory.Builder drugCostCategory) { + @NotNull public Builder costCategory(DrugCostCategory.Builder drugCostCategory) { return this.costCategory(drugCostCategory.build()); } /** * The currency (in 3-letter ISO 4217 format) of the drug cost. */ - public Builder costCurrency(String costCurrency) { + @NotNull public Builder costCurrency(String costCurrency) { this.costCurrency = costCurrency; return this; } /** * Additional details to capture the origin of the cost data. For example, 'Medicare Part B'. */ - public Builder costOrigin(String costOrigin) { + @NotNull public Builder costOrigin(String costOrigin) { this.costOrigin = costOrigin; return this; } /** * The cost per unit of the drug. */ - public Builder costPerUnit(Number number) { + @NotNull public Builder costPerUnit(Number number) { if (this.costPerUnit == null) this.costPerUnit = new NumberOrString(); this.costPerUnit.setNumber(number); return this; @@ -119,7 +123,7 @@ public Builder costPerUnit(Number number) { /** * The cost per unit of the drug. */ - public Builder costPerUnit(String costPerUnit) { + @NotNull public Builder costPerUnit(String costPerUnit) { if (this.costPerUnit == null) this.costPerUnit = new NumberOrString(); this.costPerUnit.setString(costPerUnit); return this; @@ -127,106 +131,106 @@ public Builder costPerUnit(String costPerUnit) { /** * The unit in which the drug is measured, e.g. '5 mg tablet'. */ - public Builder drugUnit(String drugUnit) { + @NotNull public Builder drugUnit(String drugUnit) { this.drugUnit = drugUnit; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -260,7 +264,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -328,7 +332,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -336,38 +340,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -397,39 +401,39 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder applicableLocation(AdministrativeArea administrativeArea); - Builder applicableLocation(AdministrativeArea.Builder administrativeArea); - Builder costCategory(DrugCostCategory drugCostCategory); - Builder costCategory(DrugCostCategory.Builder drugCostCategory); - Builder costCurrency(String costCurrency); - Builder costOrigin(String costOrigin); - Builder costPerUnit(Number number); - Builder costPerUnit(String costPerUnit); - Builder drugUnit(String drugUnit); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder applicableLocation(AdministrativeArea administrativeArea); + @NotNull Builder applicableLocation(AdministrativeArea.Builder administrativeArea); + @NotNull Builder costCategory(DrugCostCategory drugCostCategory); + @NotNull Builder costCategory(DrugCostCategory.Builder drugCostCategory); + @NotNull Builder costCurrency(String costCurrency); + @NotNull Builder costOrigin(String costOrigin); + @NotNull Builder costPerUnit(Number number); + @NotNull Builder costPerUnit(String costPerUnit); + @NotNull Builder drugUnit(String drugUnit); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/DrugCostCategory.java b/src/main/java/org/schema/DrugCostCategory.java index 4a4ae089..6bf1801a 100644 --- a/src/main/java/org/schema/DrugCostCategory.java +++ b/src/main/java/org/schema/DrugCostCategory.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Enumerated categories of medical drug costs. */ @@ -25,7 +29,7 @@ public class DrugCostCategory extends Enumeration { /** * Builder for {@link DrugCostCategory} */ - public static final class DrugCostCategoryThingBuilder implements Builder { + static final class DrugCostCategoryThingBuilder implements Builder { /** * Creates new {@link DrugCostCategory} instance. */ @@ -35,7 +39,7 @@ public DrugCostCategory build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DrugCostCategory(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/DrugLegalStatus.java b/src/main/java/org/schema/DrugLegalStatus.java index ad15dc70..8f9ef384 100644 --- a/src/main/java/org/schema/DrugLegalStatus.java +++ b/src/main/java/org/schema/DrugLegalStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The legal availability status of a medical drug. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public AdministrativeArea getApplicableLocation() { /** * Builder for {@link DrugLegalStatus} */ - public static final class DrugLegalStatusThingBuilder implements Builder { + static final class DrugLegalStatusThingBuilder implements Builder { /** * Creates new {@link DrugLegalStatus} instance. */ @@ -42,112 +46,112 @@ public DrugLegalStatus build() { /** * The location in which the status applies. */ - public Builder applicableLocation(AdministrativeArea administrativeArea) { + @NotNull public Builder applicableLocation(AdministrativeArea administrativeArea) { this.applicableLocation = administrativeArea; return this; } /** * The location in which the status applies. */ - public Builder applicableLocation(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder applicableLocation(AdministrativeArea.Builder administrativeArea) { return this.applicableLocation(administrativeArea.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder applicableLocation(AdministrativeArea administrativeArea); - Builder applicableLocation(AdministrativeArea.Builder administrativeArea); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder applicableLocation(AdministrativeArea administrativeArea); + @NotNull Builder applicableLocation(AdministrativeArea.Builder administrativeArea); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DrugLegalStatus(AdministrativeArea applicableLocation, 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) { diff --git a/src/main/java/org/schema/DrugPregnancyCategory.java b/src/main/java/org/schema/DrugPregnancyCategory.java index 4a1d5b07..dd2a97cb 100644 --- a/src/main/java/org/schema/DrugPregnancyCategory.java +++ b/src/main/java/org/schema/DrugPregnancyCategory.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Categories that represent an assessment of the risk of fetal injury due to a drug or pharmaceutical used as directed by the mother during pregnancy. */ @@ -25,7 +29,7 @@ public class DrugPregnancyCategory extends Enumeration { /** * Builder for {@link DrugPregnancyCategory} */ - public static final class DrugPregnancyCategoryThingBuilder implements Builder { + static final class DrugPregnancyCategoryThingBuilder implements Builder { /** * Creates new {@link DrugPregnancyCategory} instance. */ @@ -35,7 +39,7 @@ public DrugPregnancyCategory build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DrugPregnancyCategory(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/DrugPrescriptionStatus.java b/src/main/java/org/schema/DrugPrescriptionStatus.java index 1d967c76..80836b29 100644 --- a/src/main/java/org/schema/DrugPrescriptionStatus.java +++ b/src/main/java/org/schema/DrugPrescriptionStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates whether this drug is available by prescription or over-the-counter. */ @@ -25,7 +29,7 @@ public class DrugPrescriptionStatus extends Enumeration { /** * Builder for {@link DrugPrescriptionStatus} */ - public static final class DrugPrescriptionStatusThingBuilder implements Builder { + static final class DrugPrescriptionStatusThingBuilder implements Builder { /** * Creates new {@link DrugPrescriptionStatus} instance. */ @@ -35,7 +39,7 @@ public DrugPrescriptionStatus build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DrugPrescriptionStatus(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/DrugStrength.java b/src/main/java/org/schema/DrugStrength.java index 86c842f9..43b3f250 100644 --- a/src/main/java/org/schema/DrugStrength.java +++ b/src/main/java/org/schema/DrugStrength.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific strength in which a medical drug is available in a specific country. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -50,7 +54,7 @@ public Number getStrengthValue() { /** * Builder for {@link DrugStrength} */ - public static final class DrugStrengthThingBuilder implements Builder { + static final class DrugStrengthThingBuilder implements Builder { /** * Creates new {@link DrugStrength} instance. */ @@ -60,42 +64,42 @@ public DrugStrength build() { /** * An active ingredient, typically chemical compounds and/or biologic substances. */ - public Builder activeIngredient(String activeIngredient) { + @NotNull public Builder activeIngredient(String activeIngredient) { this.activeIngredient = activeIngredient; return this; } /** * The location in which the strength is available. */ - public Builder availableIn(AdministrativeArea administrativeArea) { + @NotNull public Builder availableIn(AdministrativeArea administrativeArea) { this.availableIn = administrativeArea; return this; } /** * The location in which the strength is available. */ - public Builder availableIn(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder availableIn(AdministrativeArea.Builder administrativeArea) { return this.availableIn(administrativeArea.build()); } /** * The units of an active ingredient's strength, e.g. mg. */ - public Builder strengthUnit(String strengthUnit) { + @NotNull public Builder strengthUnit(String strengthUnit) { this.strengthUnit = strengthUnit; return this; } /** * The value of an active ingredient's strength, e.g. 325. */ - public Builder strengthValue(Integer integer) { + @NotNull public Builder strengthValue(int strengthValue) { if (this.strengthValue == null) this.strengthValue = new Number(); - this.strengthValue.setInteger(integer); + this.strengthValue.setInt(strengthValue); return this; } /** * The value of an active ingredient's strength, e.g. 325. */ - public Builder strengthValue(Long strengthValue) { + @NotNull public Builder strengthValue(long strengthValue) { if (this.strengthValue == null) this.strengthValue = new Number(); this.strengthValue.setLong(strengthValue); return this; @@ -103,7 +107,7 @@ public Builder strengthValue(Long strengthValue) { /** * The value of an active ingredient's strength, e.g. 325. */ - public Builder strengthValue(Float strengthValue) { + @NotNull public Builder strengthValue(float strengthValue) { if (this.strengthValue == null) this.strengthValue = new Number(); this.strengthValue.setFloat(strengthValue); return this; @@ -111,7 +115,7 @@ public Builder strengthValue(Float strengthValue) { /** * The value of an active ingredient's strength, e.g. 325. */ - public Builder strengthValue(Double strengthValue) { + @NotNull public Builder strengthValue(double strengthValue) { if (this.strengthValue == null) this.strengthValue = new Number(); this.strengthValue.setDouble(strengthValue); return this; @@ -119,7 +123,7 @@ public Builder strengthValue(Double strengthValue) { /** * The value of an active ingredient's strength, e.g. 325. */ - public Builder strengthValue(String strengthValue) { + @NotNull public Builder strengthValue(String strengthValue) { if (this.strengthValue == null) this.strengthValue = new Number(); this.strengthValue.setString(strengthValue); return this; @@ -127,99 +131,99 @@ public Builder strengthValue(String strengthValue) { /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -253,7 +257,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -288,7 +292,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -321,7 +325,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -329,38 +333,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -388,39 +392,39 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder activeIngredient(String activeIngredient); - Builder availableIn(AdministrativeArea administrativeArea); - Builder availableIn(AdministrativeArea.Builder administrativeArea); - Builder strengthUnit(String strengthUnit); - Builder strengthValue(Integer integer); - Builder strengthValue(Long strengthValue); - Builder strengthValue(Float strengthValue); - Builder strengthValue(Double strengthValue); - Builder strengthValue(String strengthValue); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder activeIngredient(String activeIngredient); + @NotNull Builder availableIn(AdministrativeArea administrativeArea); + @NotNull Builder availableIn(AdministrativeArea.Builder administrativeArea); + @NotNull Builder strengthUnit(String strengthUnit); + @NotNull Builder strengthValue(int strengthValue); + @NotNull Builder strengthValue(long strengthValue); + @NotNull Builder strengthValue(float strengthValue); + @NotNull Builder strengthValue(double strengthValue); + @NotNull Builder strengthValue(String strengthValue); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected DrugStrength(String activeIngredient, AdministrativeArea availableIn, String strengthUnit, Number strengthValue, 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) { diff --git a/src/main/java/org/schema/DryCleaningOrLaundry.java b/src/main/java/org/schema/DryCleaningOrLaundry.java index 23c81f7d..969def4a 100644 --- a/src/main/java/org/schema/DryCleaningOrLaundry.java +++ b/src/main/java/org/schema/DryCleaningOrLaundry.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A dry-cleaning business. */ @@ -25,7 +29,7 @@ public class DryCleaningOrLaundry extends LocalBusiness { /** * Builder for {@link DryCleaningOrLaundry} */ - public static final class DryCleaningOrLaundryThingBuilder implements Builder { + static final class DryCleaningOrLaundryThingBuilder implements Builder { /** * Creates new {@link DryCleaningOrLaundry} instance. */ @@ -35,107 +39,107 @@ public DryCleaningOrLaundry build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Duration.java b/src/main/java/org/schema/Duration.java index 18510682..8c3a4086 100644 --- a/src/main/java/org/schema/Duration.java +++ b/src/main/java/org/schema/Duration.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Quantity: Duration (use ISO 8601 duration format). */ @@ -25,7 +29,7 @@ public class Duration extends Quantity { /** * Builder for {@link Duration} */ - public static final class DurationThingBuilder implements Builder { + static final class DurationThingBuilder implements Builder { /** * Creates new {@link Duration} instance. */ @@ -35,21 +39,21 @@ public Duration build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Duration(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/DurationOrString.java b/src/main/java/org/schema/DurationOrString.java index 7e85ef8f..6e9e5109 100644 --- a/src/main/java/org/schema/DurationOrString.java +++ b/src/main/java/org/schema/DurationOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class DurationOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myDuration != null) return myDuration; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setDuration(Duration duration) { clear(); myDuration = duration; } public Duration getDuration() { return myDuration; } - private Duration myDuration; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private Duration myDuration; private String myString; private void clear() { myDuration = null; diff --git a/src/main/java/org/schema/EBook.java b/src/main/java/org/schema/EBook.java index 18d178f1..0f314c78 100644 --- a/src/main/java/org/schema/EBook.java +++ b/src/main/java/org/schema/EBook.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Book format: Ebook. */ @@ -25,7 +29,7 @@ public class EBook { /** * Builder for {@link EBook} */ - public static final class EBookThingBuilder implements Builder { + static final class EBookThingBuilder implements Builder { /** * Creates new {@link EBook} instance. */ @@ -34,7 +38,7 @@ public EBook build() { } } public interface Builder extends ThingBuilder { - + } protected EBook() { diff --git a/src/main/java/org/schema/EPRelease.java b/src/main/java/org/schema/EPRelease.java index 03568cbf..51b15621 100644 --- a/src/main/java/org/schema/EPRelease.java +++ b/src/main/java/org/schema/EPRelease.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * EPRelease. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class EPRelease { /** * Builder for {@link EPRelease} */ - public static final class EPReleaseThingBuilder implements Builder { + static final class EPReleaseThingBuilder implements Builder { /** * Creates new {@link EPRelease} instance. */ @@ -35,7 +39,7 @@ public EPRelease build() { } } public interface Builder extends ThingBuilder { - + } protected EPRelease() { diff --git a/src/main/java/org/schema/Ear.java b/src/main/java/org/schema/Ear.java index 141cb231..73cf01ce 100644 --- a/src/main/java/org/schema/Ear.java +++ b/src/main/java/org/schema/Ear.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Ear. */ @@ -25,7 +29,7 @@ public class Ear { /** * Builder for {@link Ear} */ - public static final class EarThingBuilder implements Builder { + static final class EarThingBuilder implements Builder { /** * Creates new {@link Ear} instance. */ @@ -34,7 +38,7 @@ public Ear build() { } } public interface Builder extends ThingBuilder { - + } protected Ear() { diff --git a/src/main/java/org/schema/EatAction.java b/src/main/java/org/schema/EatAction.java index b7cfc2f7..8fbe8b19 100644 --- a/src/main/java/org/schema/EatAction.java +++ b/src/main/java/org/schema/EatAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of swallowing solid objects. */ @@ -25,7 +29,7 @@ public class EatAction extends ConsumeAction { /** * Builder for {@link EatAction} */ - public static final class EatActionThingBuilder implements Builder { + static final class EatActionThingBuilder implements Builder { /** * Creates new {@link EatAction} instance. */ @@ -35,20 +39,20 @@ public EatAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/EducationEvent.java b/src/main/java/org/schema/EducationEvent.java index 2d8bd200..8b4ab3be 100644 --- a/src/main/java/org/schema/EducationEvent.java +++ b/src/main/java/org/schema/EducationEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Education event. */ @@ -25,7 +29,7 @@ public class EducationEvent extends Event { /** * Builder for {@link EducationEvent} */ - public static final class EducationEventThingBuilder implements Builder { + static final class EducationEventThingBuilder implements Builder { /** * Creates new {@link EducationEvent} instance. */ @@ -35,20 +39,20 @@ public EducationEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/EducationalAudience.java b/src/main/java/org/schema/EducationalAudience.java index 29ff2509..651b8795 100644 --- a/src/main/java/org/schema/EducationalAudience.java +++ b/src/main/java/org/schema/EducationalAudience.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An EducationalAudience. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_LRMIClass @@ -32,7 +36,7 @@ public String getEducationalRole() { /** * Builder for {@link EducationalAudience} */ - public static final class EducationalAudienceThingBuilder implements Builder { + static final class EducationalAudienceThingBuilder implements Builder { /** * Creates new {@link EducationalAudience} instance. */ @@ -42,48 +46,48 @@ public EducationalAudience build() { /** * An educationalRole of an EducationalAudience. */ - public Builder educationalRole(String educationalRole) { + @NotNull public Builder educationalRole(String educationalRole) { this.educationalRole = educationalRole; return this; } /** * The target group associated with a given audience (e.g. veterans, car owners, musicians, etc.). */ - public Builder audienceType(String audienceType) { + @NotNull public Builder audienceType(String audienceType) { this.audienceType = audienceType; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea administrativeArea) { this.geographicArea = administrativeArea; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { return this.geographicArea(administrativeArea.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -117,7 +121,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -152,7 +156,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -185,7 +189,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -193,38 +197,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -245,22 +249,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder educationalRole(String educationalRole); - Builder audienceType(String audienceType); - Builder geographicArea(AdministrativeArea administrativeArea); - Builder geographicArea(AdministrativeArea.Builder administrativeArea); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder educationalRole(String educationalRole); + @NotNull Builder audienceType(String audienceType); + @NotNull Builder geographicArea(AdministrativeArea administrativeArea); + @NotNull Builder geographicArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected EducationalAudience(String educationalRole, String audienceType, AdministrativeArea geographicArea, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/EducationalOrganization.java b/src/main/java/org/schema/EducationalOrganization.java index a35cc3cd..b8473367 100644 --- a/src/main/java/org/schema/EducationalOrganization.java +++ b/src/main/java/org/schema/EducationalOrganization.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An educational organization. */ @@ -31,7 +35,7 @@ public Person getAlumni() { /** * Builder for {@link EducationalOrganization} */ - public static final class EducationalOrganizationThingBuilder implements Builder { + static final class EducationalOrganizationThingBuilder implements Builder { /** * Creates new {@link EducationalOrganization} instance. */ @@ -41,53 +45,53 @@ public EducationalOrganization build() { /** * Alumni of educational organization. */ - public Builder alumni(Person person) { + @NotNull public Builder alumni(Person person) { this.alumni = person; return this; } /** * Alumni of educational organization. */ - public Builder alumni(Person.Builder person) { + @NotNull public Builder alumni(Person.Builder person) { return this.alumni(person.build()); } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -95,13 +99,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -109,147 +113,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -257,13 +261,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -271,20 +275,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -292,13 +296,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -306,13 +310,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -320,13 +324,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -334,33 +338,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -368,13 +372,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -382,100 +386,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -509,7 +513,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -544,7 +548,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -577,7 +581,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -585,38 +589,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -667,80 +671,80 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder alumni(Person person); - Builder alumni(Person.Builder person); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder alumni(Person person); + @NotNull Builder alumni(Person.Builder person); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected EducationalOrganization(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) { diff --git a/src/main/java/org/schema/Electrician.java b/src/main/java/org/schema/Electrician.java index f9bf4ba2..5bee6f48 100644 --- a/src/main/java/org/schema/Electrician.java +++ b/src/main/java/org/schema/Electrician.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An electrician. */ @@ -25,7 +29,7 @@ public class Electrician extends ProfessionalService { /** * Builder for {@link Electrician} */ - public static final class ElectricianThingBuilder implements Builder { + static final class ElectricianThingBuilder implements Builder { /** * Creates new {@link Electrician} instance. */ @@ -35,107 +39,107 @@ public Electrician build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ElectronicsStore.java b/src/main/java/org/schema/ElectronicsStore.java index 85ec553c..b48ececb 100644 --- a/src/main/java/org/schema/ElectronicsStore.java +++ b/src/main/java/org/schema/ElectronicsStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An electronics store. */ @@ -25,7 +29,7 @@ public class ElectronicsStore extends Store { /** * Builder for {@link ElectronicsStore} */ - public static final class ElectronicsStoreThingBuilder implements Builder { + static final class ElectronicsStoreThingBuilder implements Builder { /** * Creates new {@link ElectronicsStore} instance. */ @@ -35,107 +39,107 @@ public ElectronicsStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ElementarySchool.java b/src/main/java/org/schema/ElementarySchool.java index c5fa4c03..3a2b1211 100644 --- a/src/main/java/org/schema/ElementarySchool.java +++ b/src/main/java/org/schema/ElementarySchool.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An elementary school. */ @@ -25,7 +29,7 @@ public class ElementarySchool extends EducationalOrganization { /** * Builder for {@link ElementarySchool} */ - public static final class ElementarySchoolThingBuilder implements Builder { + static final class ElementarySchoolThingBuilder implements Builder { /** * Creates new {@link ElementarySchool} instance. */ @@ -35,53 +39,53 @@ public ElementarySchool build() { /** * Alumni of educational organization. */ - public Builder alumni(Person person) { + @NotNull public Builder alumni(Person person) { this.alumni = person; return this; } /** * Alumni of educational organization. */ - public Builder alumni(Person.Builder person) { + @NotNull public Builder alumni(Person.Builder person) { return this.alumni(person.build()); } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -89,13 +93,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -103,147 +107,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -251,13 +255,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -265,20 +269,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -286,13 +290,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -300,13 +304,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -314,13 +318,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -328,33 +332,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -362,13 +366,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -376,100 +380,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -503,7 +507,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -538,7 +542,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -571,7 +575,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -579,38 +583,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -661,80 +665,80 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder alumni(Person person); - Builder alumni(Person.Builder person); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder alumni(Person person); + @NotNull Builder alumni(Person.Builder person); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/EmailMessage.java b/src/main/java/org/schema/EmailMessage.java index a20c07eb..bd761056 100644 --- a/src/main/java/org/schema/EmailMessage.java +++ b/src/main/java/org/schema/EmailMessage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An email message. */ @@ -25,7 +29,7 @@ public class EmailMessage extends CreativeWork { /** * Builder for {@link EmailMessage} */ - public static final class EmailMessageThingBuilder implements Builder { + static final class EmailMessageThingBuilder implements Builder { /** * Creates new {@link EmailMessage} instance. */ @@ -35,127 +39,127 @@ public EmailMessage build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/Embassy.java b/src/main/java/org/schema/Embassy.java index ae8a955c..2284dcdb 100644 --- a/src/main/java/org/schema/Embassy.java +++ b/src/main/java/org/schema/Embassy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An embassy. */ @@ -25,7 +29,7 @@ public class Embassy extends GovernmentBuilding { /** * Builder for {@link Embassy} */ - public static final class EmbassyThingBuilder implements Builder { + static final class EmbassyThingBuilder implements Builder { /** * Creates new {@link Embassy} instance. */ @@ -35,73 +39,73 @@ public Embassy build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Emergency.java b/src/main/java/org/schema/Emergency.java index 7ae18f3a..e5f9c50a 100644 --- a/src/main/java/org/schema/Emergency.java +++ b/src/main/java/org/schema/Emergency.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that is deals with the evaluation and initial treatment of medical conditions caused by trauma or sudden illness. */ @@ -25,7 +29,7 @@ public class Emergency { /** * Builder for {@link Emergency} */ - public static final class EmergencyThingBuilder implements Builder { + static final class EmergencyThingBuilder implements Builder { /** * Creates new {@link Emergency} instance. */ @@ -34,7 +38,7 @@ public Emergency build() { } } public interface Builder extends ThingBuilder { - + } protected Emergency() { diff --git a/src/main/java/org/schema/EmergencyService.java b/src/main/java/org/schema/EmergencyService.java index 4091302d..224c7fa1 100644 --- a/src/main/java/org/schema/EmergencyService.java +++ b/src/main/java/org/schema/EmergencyService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An emergency service, such as a fire station or ER. */ @@ -25,7 +29,7 @@ public class EmergencyService extends LocalBusiness { /** * Builder for {@link EmergencyService} */ - public static final class EmergencyServiceThingBuilder implements Builder { + static final class EmergencyServiceThingBuilder implements Builder { /** * Creates new {@link EmergencyService} instance. */ @@ -35,107 +39,107 @@ public EmergencyService build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/EmployeeRole.java b/src/main/java/org/schema/EmployeeRole.java index 8ac74b67..4406eb0e 100644 --- a/src/main/java/org/schema/EmployeeRole.java +++ b/src/main/java/org/schema/EmployeeRole.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A subclass of OrganizationRole used to describe employee relationships. */ @@ -31,7 +35,7 @@ public String getSalaryCurrency() { /** * Builder for {@link EmployeeRole} */ - public static final class EmployeeRoleThingBuilder implements Builder { + static final class EmployeeRoleThingBuilder implements Builder { /** * Creates new {@link EmployeeRole} instance. */ @@ -41,22 +45,22 @@ public EmployeeRole build() { /** * The currency (coded using ISO 4217, http://en.wikipedia.org/wiki/ISO_4217 ) used for the main salary information in this job posting or for this employee. */ - public Builder salaryCurrency(String salaryCurrency) { + @NotNull public Builder salaryCurrency(String salaryCurrency) { this.salaryCurrency = salaryCurrency; return this; } /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(Integer integer) { + @NotNull public Builder numberedPosition(int numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); - this.numberedPosition.setInteger(integer); + this.numberedPosition.setInt(numberedPosition); return this; } /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(Long numberedPosition) { + @NotNull public Builder numberedPosition(long numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); this.numberedPosition.setLong(numberedPosition); return this; @@ -64,7 +68,7 @@ public Builder numberedPosition(Long numberedPosition) { /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(Float numberedPosition) { + @NotNull public Builder numberedPosition(float numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); this.numberedPosition.setFloat(numberedPosition); return this; @@ -72,7 +76,7 @@ public Builder numberedPosition(Float numberedPosition) { /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(Double numberedPosition) { + @NotNull public Builder numberedPosition(double numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); this.numberedPosition.setDouble(numberedPosition); return this; @@ -80,7 +84,7 @@ public Builder numberedPosition(Double numberedPosition) { /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(String numberedPosition) { + @NotNull public Builder numberedPosition(String numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); this.numberedPosition.setString(numberedPosition); return this; @@ -88,35 +92,35 @@ public Builder numberedPosition(String numberedPosition) { /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * A role played, performed or filled by a person or organization. For example, the team of creators for a comic book might fill the roles named 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might play in the position named 'Quarterback'. */ - public Builder roleName(String roleName) { + @NotNull public Builder roleName(String roleName) { this.roleName = roleName; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -150,7 +154,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -185,7 +189,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -218,7 +222,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -226,38 +230,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -279,26 +283,26 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder salaryCurrency(String salaryCurrency); - Builder numberedPosition(Integer integer); - Builder numberedPosition(Long numberedPosition); - Builder numberedPosition(Float numberedPosition); - Builder numberedPosition(Double numberedPosition); - Builder numberedPosition(String numberedPosition); - Builder startDate(java.util.Date date); - Builder roleName(String roleName); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder salaryCurrency(String salaryCurrency); + @NotNull Builder numberedPosition(int numberedPosition); + @NotNull Builder numberedPosition(long numberedPosition); + @NotNull Builder numberedPosition(float numberedPosition); + @NotNull Builder numberedPosition(double numberedPosition); + @NotNull Builder numberedPosition(String numberedPosition); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder roleName(String roleName); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected EmployeeRole(String salaryCurrency, Number numberedPosition, java.util.Date startDate, String roleName, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/EmploymentAgency.java b/src/main/java/org/schema/EmploymentAgency.java index bb4ca30f..99fecaf6 100644 --- a/src/main/java/org/schema/EmploymentAgency.java +++ b/src/main/java/org/schema/EmploymentAgency.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An employment agency. */ @@ -25,7 +29,7 @@ public class EmploymentAgency extends LocalBusiness { /** * Builder for {@link EmploymentAgency} */ - public static final class EmploymentAgencyThingBuilder implements Builder { + static final class EmploymentAgencyThingBuilder implements Builder { /** * Creates new {@link EmploymentAgency} instance. */ @@ -35,107 +39,107 @@ public EmploymentAgency build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Endocrine.java b/src/main/java/org/schema/Endocrine.java index da0a0a35..644f227b 100644 --- a/src/main/java/org/schema/Endocrine.java +++ b/src/main/java/org/schema/Endocrine.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to diagnosis and treatment of disorders of endocrine glands and their secretions. */ @@ -25,7 +29,7 @@ public class Endocrine { /** * Builder for {@link Endocrine} */ - public static final class EndocrineThingBuilder implements Builder { + static final class EndocrineThingBuilder implements Builder { /** * Creates new {@link Endocrine} instance. */ @@ -34,7 +38,7 @@ public Endocrine build() { } } public interface Builder extends ThingBuilder { - + } protected Endocrine() { diff --git a/src/main/java/org/schema/EndorseAction.java b/src/main/java/org/schema/EndorseAction.java index effc397e..128a9e9c 100644 --- a/src/main/java/org/schema/EndorseAction.java +++ b/src/main/java/org/schema/EndorseAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent approves/certifies/likes/supports/sanction an object. */ @@ -31,7 +35,7 @@ public OrganizationOrPerson getEndorsee() { /** * Builder for {@link EndorseAction} */ - public static final class EndorseActionThingBuilder implements Builder { + static final class EndorseActionThingBuilder implements Builder { /** * Creates new {@link EndorseAction} instance. */ @@ -41,7 +45,7 @@ public EndorseAction build() { /** * A sub property of participant. The person/organization being supported. */ - public Builder endorsee(Organization organization) { + @NotNull public Builder endorsee(Organization organization) { if (this.endorsee == null) this.endorsee = new OrganizationOrPerson(); this.endorsee.setOrganization(organization); return this; @@ -49,13 +53,13 @@ public Builder endorsee(Organization organization) { /** * A sub property of participant. The person/organization being supported. */ - public Builder endorsee(Organization.Builder organization) { + @NotNull public Builder endorsee(Organization.Builder organization) { return this.endorsee(organization.build()); } /** * A sub property of participant. The person/organization being supported. */ - public Builder endorsee(Person person) { + @NotNull public Builder endorsee(Person person) { if (this.endorsee == null) this.endorsee = new OrganizationOrPerson(); this.endorsee.setPerson(person); return this; @@ -63,13 +67,13 @@ public Builder endorsee(Person person) { /** * A sub property of participant. The person/organization being supported. */ - public Builder endorsee(Person.Builder person) { + @NotNull public Builder endorsee(Person.Builder person) { return this.endorsee(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -77,13 +81,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -91,7 +95,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -99,7 +103,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -108,67 +112,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -202,7 +206,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -237,7 +241,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -270,7 +274,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -278,38 +282,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -334,34 +338,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder endorsee(Organization organization); - Builder endorsee(Organization.Builder organization); - Builder endorsee(Person person); - Builder endorsee(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder endorsee(Organization organization); + @NotNull Builder endorsee(Organization.Builder organization); + @NotNull Builder endorsee(Person person); + @NotNull Builder endorsee(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected EndorseAction(OrganizationOrPerson endorsee, 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) { diff --git a/src/main/java/org/schema/Energy.java b/src/main/java/org/schema/Energy.java index c95e55ee..e04a7a2f 100644 --- a/src/main/java/org/schema/Energy.java +++ b/src/main/java/org/schema/Energy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Properties that take Energy as values are of the form '<Number> <Energy unit of measure>'. */ @@ -25,7 +29,7 @@ public class Energy extends Quantity { /** * Builder for {@link Energy} */ - public static final class EnergyThingBuilder implements Builder { + static final class EnergyThingBuilder implements Builder { /** * Creates new {@link Energy} instance. */ @@ -35,21 +39,21 @@ public Energy build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Energy(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/EngineSpecification.java b/src/main/java/org/schema/EngineSpecification.java index 2e1b37c7..9de5eef8 100644 --- a/src/main/java/org/schema/EngineSpecification.java +++ b/src/main/java/org/schema/EngineSpecification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Information about the engine of the vehicle. A vehicle can have multiple engines represented by multiple engine specification entities. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -32,7 +36,7 @@ public QualitativeValueOrString getFuelType() { /** * Builder for {@link EngineSpecification} */ - public static final class EngineSpecificationThingBuilder implements Builder { + static final class EngineSpecificationThingBuilder implements Builder { /** * Creates new {@link EngineSpecification} instance. */ @@ -42,7 +46,7 @@ public EngineSpecification build() { /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(QualitativeValue qualitativeValue) { + @NotNull public Builder fuelType(QualitativeValue qualitativeValue) { if (this.fuelType == null) this.fuelType = new QualitativeValueOrString(); this.fuelType.setQualitativeValue(qualitativeValue); return this; @@ -50,13 +54,13 @@ public Builder fuelType(QualitativeValue qualitativeValue) { /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder fuelType(QualitativeValue.Builder qualitativeValue) { return this.fuelType(qualitativeValue.build()); } /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(String fuelType) { + @NotNull public Builder fuelType(String fuelType) { if (this.fuelType == null) this.fuelType = new QualitativeValueOrString(); this.fuelType.setString(fuelType); return this; @@ -64,21 +68,21 @@ public Builder fuelType(String fuelType) { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,21 +242,21 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder fuelType(QualitativeValue qualitativeValue); - Builder fuelType(QualitativeValue.Builder qualitativeValue); - Builder fuelType(String fuelType); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder fuelType(QualitativeValue qualitativeValue); + @NotNull Builder fuelType(QualitativeValue.Builder qualitativeValue); + @NotNull Builder fuelType(String fuelType); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected EngineSpecification(QualitativeValueOrString fuelType, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/EnrollingByInvitation.java b/src/main/java/org/schema/EnrollingByInvitation.java index 296d333d..408d9ca4 100644 --- a/src/main/java/org/schema/EnrollingByInvitation.java +++ b/src/main/java/org/schema/EnrollingByInvitation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Enrolling participants by invitation only. */ @@ -25,7 +29,7 @@ public class EnrollingByInvitation { /** * Builder for {@link EnrollingByInvitation} */ - public static final class EnrollingByInvitationThingBuilder implements Builder { + static final class EnrollingByInvitationThingBuilder implements Builder { /** * Creates new {@link EnrollingByInvitation} instance. */ @@ -34,7 +38,7 @@ public EnrollingByInvitation build() { } } public interface Builder extends ThingBuilder { - + } protected EnrollingByInvitation() { diff --git a/src/main/java/org/schema/EntertainmentBusiness.java b/src/main/java/org/schema/EntertainmentBusiness.java index 99411d77..cd3bab1c 100644 --- a/src/main/java/org/schema/EntertainmentBusiness.java +++ b/src/main/java/org/schema/EntertainmentBusiness.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A business providing entertainment. */ @@ -25,7 +29,7 @@ public class EntertainmentBusiness extends LocalBusiness { /** * Builder for {@link EntertainmentBusiness} */ - public static final class EntertainmentBusinessThingBuilder implements Builder { + static final class EntertainmentBusinessThingBuilder implements Builder { /** * Creates new {@link EntertainmentBusiness} instance. */ @@ -35,107 +39,107 @@ public EntertainmentBusiness build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/EntryPoint.java b/src/main/java/org/schema/EntryPoint.java index 3ff843ae..c920f944 100644 --- a/src/main/java/org/schema/EntryPoint.java +++ b/src/main/java/org/schema/EntryPoint.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An entry point, within some Web-based protocol. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_ActionCollabClass @@ -56,7 +60,7 @@ public String getUrlTemplate() { /** * Builder for {@link EntryPoint} */ - public static final class EntryPointThingBuilder implements Builder { + static final class EntryPointThingBuilder implements Builder { /** * Creates new {@link EntryPoint} instance. */ @@ -66,62 +70,62 @@ public EntryPoint build() { /** * An HTTP method that specifies the appropriate HTTP method for a request to an HTTP EntryPoint. Values are capitalized strings as used in HTTP. */ - public Builder httpMethod(String httpMethod) { + @NotNull public Builder httpMethod(String httpMethod) { this.httpMethod = httpMethod; return this; } /** * The supported encoding type(s) for an EntryPoint request. */ - public Builder encodingType(String encodingType) { + @NotNull public Builder encodingType(String encodingType) { this.encodingType = encodingType; return this; } /** * The supported content type(s) for an EntryPoint response. */ - public Builder contentType(String contentType) { + @NotNull public Builder contentType(String contentType) { this.contentType = contentType; return this; } /** * An application that can complete the request. */ - public Builder actionApplication(SoftwareApplication softwareApplication) { + @NotNull public Builder actionApplication(SoftwareApplication softwareApplication) { this.actionApplication = softwareApplication; return this; } /** * An application that can complete the request. */ - public Builder actionApplication(SoftwareApplication.Builder softwareApplication) { + @NotNull public Builder actionApplication(SoftwareApplication.Builder softwareApplication) { return this.actionApplication(softwareApplication.build()); } /** * An url template (RFC6570) that will be used to construct the target of the execution of the action. */ - public Builder urlTemplate(String urlTemplate) { + @NotNull public Builder urlTemplate(String urlTemplate) { this.urlTemplate = urlTemplate; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -155,7 +159,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -190,7 +194,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -223,7 +227,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -231,38 +235,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -285,24 +289,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder httpMethod(String httpMethod); - Builder encodingType(String encodingType); - Builder contentType(String contentType); - Builder actionApplication(SoftwareApplication softwareApplication); - Builder actionApplication(SoftwareApplication.Builder softwareApplication); - Builder urlTemplate(String urlTemplate); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder httpMethod(String httpMethod); + @NotNull Builder encodingType(String encodingType); + @NotNull Builder contentType(String contentType); + @NotNull Builder actionApplication(SoftwareApplication softwareApplication); + @NotNull Builder actionApplication(SoftwareApplication.Builder softwareApplication); + @NotNull Builder urlTemplate(String urlTemplate); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected EntryPoint(String httpMethod, String encodingType, String contentType, SoftwareApplication actionApplication, String urlTemplate, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Enumeration.java b/src/main/java/org/schema/Enumeration.java index dcccb3a0..bc87bfe9 100644 --- a/src/main/java/org/schema/Enumeration.java +++ b/src/main/java/org/schema/Enumeration.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Lists or enumerations—for example, a list of cuisines or music genres, etc. */ @@ -31,7 +35,7 @@ public EnumerationOrProperty getSupersededBy() { /** * Builder for {@link Enumeration} */ - public static final class EnumerationThingBuilder implements Builder { + static final class EnumerationThingBuilder implements Builder { /** * Creates new {@link Enumeration} instance. */ @@ -41,7 +45,7 @@ public Enumeration build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -49,13 +53,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -63,27 +67,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -117,7 +121,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -152,7 +156,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -185,7 +189,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -193,38 +197,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -243,22 +247,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Enumeration(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/EnumerationOrProperty.java b/src/main/java/org/schema/EnumerationOrProperty.java index 7bdd1c9f..fa8cd25b 100644 --- a/src/main/java/org/schema/EnumerationOrProperty.java +++ b/src/main/java/org/schema/EnumerationOrProperty.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class EnumerationOrProperty { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myEnumeration != null) return myEnumeration; if (myProperty != null) return myProperty; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setEnumeration(Enumeration enumeration) { clear(); myEnumeration = enumeration; } public Enumeration getEnumeration() { return myEnumeration; } - private Enumeration myEnumeration; public void setProperty(Property property) { clear(); myProperty = property; } public Property getProperty() { return myProperty; } + private Enumeration myEnumeration; private Property myProperty; private void clear() { myEnumeration = null; diff --git a/src/main/java/org/schema/EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.java b/src/main/java/org/schema/EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.java index 4082e669..4bd915d2 100644 --- a/src/main/java/org/schema/EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.java +++ b/src/main/java/org/schema/EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myEnumeration != null) return myEnumeration; if (myPropertyValue != null) return myPropertyValue; @@ -39,18 +42,18 @@ public Thing getThing() { } public void setEnumeration(Enumeration enumeration) { clear(); myEnumeration = enumeration; } public Enumeration getEnumeration() { return myEnumeration; } - private Enumeration myEnumeration; public void setPropertyValue(PropertyValue propertyValue) { clear(); myPropertyValue = propertyValue; } public PropertyValue getPropertyValue() { return myPropertyValue; } - private PropertyValue myPropertyValue; public void setQualitativeValue(QualitativeValue qualitativeValue) { clear(); myQualitativeValue = qualitativeValue; } public QualitativeValue getQualitativeValue() { return myQualitativeValue; } - private QualitativeValue myQualitativeValue; public void setQuantitativeValue(QuantitativeValue quantitativeValue) { clear(); myQuantitativeValue = quantitativeValue; } public QuantitativeValue getQuantitativeValue() { return myQuantitativeValue; } - private QuantitativeValue myQuantitativeValue; public void setStructuredValue(StructuredValue structuredValue) { clear(); myStructuredValue = structuredValue; } public StructuredValue getStructuredValue() { return myStructuredValue; } + private Enumeration myEnumeration; + private PropertyValue myPropertyValue; + private QualitativeValue myQualitativeValue; + private QuantitativeValue myQuantitativeValue; private StructuredValue myStructuredValue; private void clear() { myEnumeration = null; diff --git a/src/main/java/org/schema/Episode.java b/src/main/java/org/schema/Episode.java index eb6b70aa..71f01450 100644 --- a/src/main/java/org/schema/Episode.java +++ b/src/main/java/org/schema/Episode.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A media episode (e.g. TV, radio, video game) which can be part of a series or season. */ @@ -37,7 +41,7 @@ public Person getDirector() { /** * Position of the episode within an ordered group of episodes. */ - public IntegerOrString getEpisodeNumber() { + public StringOrInt getEpisodeNumber() { return myEpisodeNumber; } /** @@ -73,7 +77,7 @@ public VideoObject getTrailer() { /** * Builder for {@link Episode} */ - public static final class EpisodeThingBuilder implements Builder { + static final class EpisodeThingBuilder implements Builder { /** * Creates new {@link Episode} instance. */ @@ -83,49 +87,49 @@ public Episode build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * Position of the episode within an ordered group of episodes. */ - public Builder episodeNumber(Integer integer) { - if (this.episodeNumber == null) this.episodeNumber = new IntegerOrString(); - this.episodeNumber.setInteger(integer); + @NotNull public Builder episodeNumber(String episodeNumber) { + if (this.episodeNumber == null) this.episodeNumber = new StringOrInt(); + this.episodeNumber.setString(episodeNumber); return this; } /** * Position of the episode within an ordered group of episodes. */ - public Builder episodeNumber(String episodeNumber) { - if (this.episodeNumber == null) this.episodeNumber = new IntegerOrString(); - this.episodeNumber.setString(episodeNumber); + @NotNull public Builder episodeNumber(int episodeNumber) { + if (this.episodeNumber == null) this.episodeNumber = new StringOrInt(); + this.episodeNumber.setInt(episodeNumber); return this; } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -133,13 +137,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -147,173 +151,173 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The season to which this episode belongs. */ - public Builder partOfSeason(IsPartOf isPartOf) { + @NotNull public Builder partOfSeason(IsPartOf isPartOf) { this.partOfSeason = isPartOf; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -321,13 +325,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -335,20 +339,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -356,13 +360,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -370,40 +374,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -411,13 +415,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -425,13 +429,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -439,13 +443,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -453,21 +457,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -475,7 +479,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -483,7 +487,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -491,7 +495,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -499,7 +503,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -507,13 +511,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -521,101 +525,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -623,13 +627,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -637,35 +641,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -673,13 +677,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -687,53 +691,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -741,13 +745,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -755,127 +759,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -883,7 +887,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -891,7 +895,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -899,7 +903,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -907,20 +911,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -928,13 +932,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -942,66 +946,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1009,13 +1013,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1023,40 +1027,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1090,7 +1094,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1125,7 +1129,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1158,7 +1162,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1166,38 +1170,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1206,7 +1210,7 @@ public Builder id(long id) { } private Person actor; private Person director; - private IntegerOrString episodeNumber; + private StringOrInt episodeNumber; private MusicGroupOrPerson musicBy; private IsPartOf partOfSeason; private IsPartOf partOfSeries; @@ -1268,7 +1272,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1286,160 +1290,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder episodeNumber(Integer integer); - Builder episodeNumber(String episodeNumber); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder partOfSeason(IsPartOf isPartOf); - Builder partOfSeries(IsPartOf isPartOf); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder episodeNumber(String episodeNumber); + @NotNull Builder episodeNumber(int episodeNumber); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder partOfSeason(IsPartOf isPartOf); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Episode(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) { + protected Episode(Person actor, Person director, StringOrInt 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, int 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); myActor = actor; myDirector = director; @@ -1452,7 +1456,7 @@ protected Episode(Person actor, Person director, IntegerOrString episodeNumber, } private Person myActor; private Person myDirector; - private IntegerOrString myEpisodeNumber; + private StringOrInt myEpisodeNumber; private MusicGroupOrPerson myMusicBy; private IsPartOf myPartOfSeason; private IsPartOf myPartOfSeries; diff --git a/src/main/java/org/schema/Event.java b/src/main/java/org/schema/Event.java index 670682d7..10cd9e0b 100644 --- a/src/main/java/org/schema/Event.java +++ b/src/main/java/org/schema/Event.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An event happening at a certain time and location, such as a concert, lecture, or festival. Ticketing information may be added via the 'offers' property. Repeated events may be structured as separate Event objects. * Equivalent class: http://purl.org/dc/dcmitype/Event @@ -44,7 +48,7 @@ public OrganizationOrPerson getAttendee() { /** * The time admission will commence. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDoorTime() { return myDoorTime; } @@ -57,7 +61,7 @@ public Duration getDuration() { /** * The end date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getEndDate() { return myEndDate; } @@ -88,7 +92,7 @@ public OrganizationOrPerson getPerformer() { /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getPreviousStartDate() { return myPreviousStartDate; } @@ -107,7 +111,7 @@ public Review getReview() { /** * The start date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getStartDate() { return myStartDate; } @@ -138,7 +142,7 @@ public CreativeWork getWorkPerformed() { /** * Builder for {@link Event} */ - public static final class EventThingBuilder implements Builder { + static final class EventThingBuilder implements Builder { /** * Creates new {@link Event} instance. */ @@ -148,20 +152,20 @@ public Event build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -169,13 +173,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -183,13 +187,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -197,13 +201,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -211,53 +215,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -265,13 +269,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -279,20 +283,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -300,13 +304,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -314,113 +318,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -454,7 +458,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -489,7 +493,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -522,7 +526,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -530,38 +534,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -597,56 +601,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Event(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) { diff --git a/src/main/java/org/schema/EventCancelled.java b/src/main/java/org/schema/EventCancelled.java index 9d68d5a6..a07b09bf 100644 --- a/src/main/java/org/schema/EventCancelled.java +++ b/src/main/java/org/schema/EventCancelled.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The event has been cancelled. If the event has multiple startDate values, all are assumed to be cancelled. Either startDate or previousStartDate may be used to specify the event's cancelled date(s). */ @@ -25,7 +29,7 @@ public class EventCancelled { /** * Builder for {@link EventCancelled} */ - public static final class EventCancelledThingBuilder implements Builder { + static final class EventCancelledThingBuilder implements Builder { /** * Creates new {@link EventCancelled} instance. */ @@ -34,7 +38,7 @@ public EventCancelled build() { } } public interface Builder extends ThingBuilder { - + } protected EventCancelled() { diff --git a/src/main/java/org/schema/EventPostponed.java b/src/main/java/org/schema/EventPostponed.java index c5369d37..c82121a5 100644 --- a/src/main/java/org/schema/EventPostponed.java +++ b/src/main/java/org/schema/EventPostponed.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The event has been postponed and no new date has been set. The event's previousStartDate should be set. */ @@ -25,7 +29,7 @@ public class EventPostponed { /** * Builder for {@link EventPostponed} */ - public static final class EventPostponedThingBuilder implements Builder { + static final class EventPostponedThingBuilder implements Builder { /** * Creates new {@link EventPostponed} instance. */ @@ -34,7 +38,7 @@ public EventPostponed build() { } } public interface Builder extends ThingBuilder { - + } protected EventPostponed() { diff --git a/src/main/java/org/schema/EventRescheduled.java b/src/main/java/org/schema/EventRescheduled.java index b3144b48..cd02dc3c 100644 --- a/src/main/java/org/schema/EventRescheduled.java +++ b/src/main/java/org/schema/EventRescheduled.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The event has been rescheduled. The event's previousStartDate should be set to the old date and the startDate should be set to the event's new date. (If the event has been rescheduled multiple times, the previousStartDate property may be repeated). */ @@ -25,7 +29,7 @@ public class EventRescheduled { /** * Builder for {@link EventRescheduled} */ - public static final class EventRescheduledThingBuilder implements Builder { + static final class EventRescheduledThingBuilder implements Builder { /** * Creates new {@link EventRescheduled} instance. */ @@ -34,7 +38,7 @@ public EventRescheduled build() { } } public interface Builder extends ThingBuilder { - + } protected EventRescheduled() { diff --git a/src/main/java/org/schema/EventReservation.java b/src/main/java/org/schema/EventReservation.java index 03835d96..66bc3836 100644 --- a/src/main/java/org/schema/EventReservation.java +++ b/src/main/java/org/schema/EventReservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservation for an event like a concert, sporting event, or lecture.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use http://schema.org/Offer. */ @@ -25,7 +29,7 @@ public class EventReservation extends Reservation { /** * Builder for {@link EventReservation} */ - public static final class EventReservationThingBuilder implements Builder { + static final class EventReservationThingBuilder implements Builder { /** * Creates new {@link EventReservation} instance. */ @@ -35,40 +39,40 @@ public EventReservation build() { /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -76,13 +80,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -90,13 +94,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -104,13 +108,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -118,53 +122,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -172,7 +176,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -180,13 +184,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -194,14 +198,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -209,13 +213,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -223,27 +227,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -277,7 +281,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -312,7 +316,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -345,7 +349,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -353,38 +357,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -414,46 +418,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/EventScheduled.java b/src/main/java/org/schema/EventScheduled.java index 6e4a7e3d..f43a4e95 100644 --- a/src/main/java/org/schema/EventScheduled.java +++ b/src/main/java/org/schema/EventScheduled.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The event is taking place or has taken place on the startDate as scheduled. Use of this value is optional, as it is assumed by default. */ @@ -25,7 +29,7 @@ public class EventScheduled { /** * Builder for {@link EventScheduled} */ - public static final class EventScheduledThingBuilder implements Builder { + static final class EventScheduledThingBuilder implements Builder { /** * Creates new {@link EventScheduled} instance. */ @@ -34,7 +38,7 @@ public EventScheduled build() { } } public interface Builder extends ThingBuilder { - + } protected EventScheduled() { diff --git a/src/main/java/org/schema/EventStatusType.java b/src/main/java/org/schema/EventStatusType.java index 08812a73..13f32c11 100644 --- a/src/main/java/org/schema/EventStatusType.java +++ b/src/main/java/org/schema/EventStatusType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * EventStatusType is an enumeration type whose instances represent several states that an Event may be in. */ @@ -25,7 +29,7 @@ public class EventStatusType extends Enumeration { /** * Builder for {@link EventStatusType} */ - public static final class EventStatusTypeThingBuilder implements Builder { + static final class EventStatusTypeThingBuilder implements Builder { /** * Creates new {@link EventStatusType} instance. */ @@ -35,7 +39,7 @@ public EventStatusType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected EventStatusType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/EventVenue.java b/src/main/java/org/schema/EventVenue.java index 46947a07..f392a7f0 100644 --- a/src/main/java/org/schema/EventVenue.java +++ b/src/main/java/org/schema/EventVenue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An event venue. */ @@ -25,7 +29,7 @@ public class EventVenue extends CivicStructure { /** * Builder for {@link EventVenue} */ - public static final class EventVenueThingBuilder implements Builder { + static final class EventVenueThingBuilder implements Builder { /** * Creates new {@link EventVenue} instance. */ @@ -35,73 +39,73 @@ public EventVenue build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/EvidenceLevelA.java b/src/main/java/org/schema/EvidenceLevelA.java index d85b89bc..cd004ac3 100644 --- a/src/main/java/org/schema/EvidenceLevelA.java +++ b/src/main/java/org/schema/EvidenceLevelA.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Data derived from multiple randomized clinical trials or meta-analyses. */ @@ -25,7 +29,7 @@ public class EvidenceLevelA { /** * Builder for {@link EvidenceLevelA} */ - public static final class EvidenceLevelAThingBuilder implements Builder { + static final class EvidenceLevelAThingBuilder implements Builder { /** * Creates new {@link EvidenceLevelA} instance. */ @@ -34,7 +38,7 @@ public EvidenceLevelA build() { } } public interface Builder extends ThingBuilder { - + } protected EvidenceLevelA() { diff --git a/src/main/java/org/schema/EvidenceLevelB.java b/src/main/java/org/schema/EvidenceLevelB.java index 6c011cc9..0854531f 100644 --- a/src/main/java/org/schema/EvidenceLevelB.java +++ b/src/main/java/org/schema/EvidenceLevelB.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Data derived from a single randomized trial, or nonrandomized studies. */ @@ -25,7 +29,7 @@ public class EvidenceLevelB { /** * Builder for {@link EvidenceLevelB} */ - public static final class EvidenceLevelBThingBuilder implements Builder { + static final class EvidenceLevelBThingBuilder implements Builder { /** * Creates new {@link EvidenceLevelB} instance. */ @@ -34,7 +38,7 @@ public EvidenceLevelB build() { } } public interface Builder extends ThingBuilder { - + } protected EvidenceLevelB() { diff --git a/src/main/java/org/schema/EvidenceLevelC.java b/src/main/java/org/schema/EvidenceLevelC.java index 95938447..fed69e98 100644 --- a/src/main/java/org/schema/EvidenceLevelC.java +++ b/src/main/java/org/schema/EvidenceLevelC.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Only consensus opinion of experts, case studies, or standard-of-care. */ @@ -25,7 +29,7 @@ public class EvidenceLevelC { /** * Builder for {@link EvidenceLevelC} */ - public static final class EvidenceLevelCThingBuilder implements Builder { + static final class EvidenceLevelCThingBuilder implements Builder { /** * Creates new {@link EvidenceLevelC} instance. */ @@ -34,7 +38,7 @@ public EvidenceLevelC build() { } } public interface Builder extends ThingBuilder { - + } protected EvidenceLevelC() { diff --git a/src/main/java/org/schema/ExerciseAction.java b/src/main/java/org/schema/ExerciseAction.java index 8cd973e7..a30dfa88 100644 --- a/src/main/java/org/schema/ExerciseAction.java +++ b/src/main/java/org/schema/ExerciseAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of participating in exertive activity for the purposes of improving health and fitness. */ @@ -91,7 +95,7 @@ public Place getToLocation() { /** * Builder for {@link ExerciseAction} */ - public static final class ExerciseActionThingBuilder implements Builder { + static final class ExerciseActionThingBuilder implements Builder { /** * Creates new {@link ExerciseAction} instance. */ @@ -101,170 +105,170 @@ public ExerciseAction build() { /** * A sub property of location. The course where this action was taken. */ - public Builder exerciseCourse(Place place) { + @NotNull public Builder exerciseCourse(Place place) { this.exerciseCourse = place; return this; } /** * A sub property of location. The course where this action was taken. */ - public Builder exerciseCourse(Place.Builder place) { + @NotNull public Builder exerciseCourse(Place.Builder place) { return this.exerciseCourse(place.build()); } /** * A sub property of instrument. The diet used in this action. */ - public Builder exerciseRelatedDiet(Diet diet) { + @NotNull public Builder exerciseRelatedDiet(Diet diet) { this.exerciseRelatedDiet = diet; return this; } /** * A sub property of instrument. The diet used in this action. */ - public Builder exerciseRelatedDiet(Diet.Builder diet) { + @NotNull public Builder exerciseRelatedDiet(Diet.Builder diet) { return this.exerciseRelatedDiet(diet.build()); } /** * The distance travelled, e.g. exercising or travelling. */ - public Builder distance(Distance distance) { + @NotNull public Builder distance(Distance distance) { this.distance = distance; return this; } /** * The distance travelled, e.g. exercising or travelling. */ - public Builder distance(Distance.Builder distance) { + @NotNull public Builder distance(Distance.Builder distance) { return this.distance(distance.build()); } /** * A sub property of instrument. The exercise plan used on this action. */ - public Builder exercisePlan(ExercisePlan exercisePlan) { + @NotNull public Builder exercisePlan(ExercisePlan exercisePlan) { this.exercisePlan = exercisePlan; return this; } /** * A sub property of instrument. The exercise plan used on this action. */ - public Builder exercisePlan(ExercisePlan.Builder exercisePlan) { + @NotNull public Builder exercisePlan(ExercisePlan.Builder exercisePlan) { return this.exercisePlan(exercisePlan.build()); } /** * Type(s) of exercise or activity, such as strength training, flexibility training, aerobics, cardiac rehabilitation, etc. */ - public Builder exerciseType(String exerciseType) { + @NotNull public Builder exerciseType(String exerciseType) { this.exerciseType = exerciseType; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of participant. The opponent on this action. */ - public Builder opponent(Person person) { + @NotNull public Builder opponent(Person person) { this.opponent = person; return this; } /** * A sub property of participant. The opponent on this action. */ - public Builder opponent(Person.Builder person) { + @NotNull public Builder opponent(Person.Builder person) { return this.opponent(person.build()); } /** * A sub property of location. The sports activity location where this action occurred. */ - public Builder sportsActivityLocation(SportsActivityLocation sportsActivityLocation) { + @NotNull public Builder sportsActivityLocation(SportsActivityLocation sportsActivityLocation) { this.sportsActivityLocation = sportsActivityLocation; return this; } /** * A sub property of location. The sports activity location where this action occurred. */ - public Builder sportsActivityLocation(SportsActivityLocation.Builder sportsActivityLocation) { + @NotNull public Builder sportsActivityLocation(SportsActivityLocation.Builder sportsActivityLocation) { return this.sportsActivityLocation(sportsActivityLocation.build()); } /** * A sub property of location. The sports event where this action occurred. */ - public Builder sportsEvent(SportsEvent sportsEvent) { + @NotNull public Builder sportsEvent(SportsEvent sportsEvent) { this.sportsEvent = sportsEvent; return this; } /** * A sub property of location. The sports event where this action occurred. */ - public Builder sportsEvent(SportsEvent.Builder sportsEvent) { + @NotNull public Builder sportsEvent(SportsEvent.Builder sportsEvent) { return this.sportsEvent(sportsEvent.build()); } /** * A sub property of participant. The sports team that participated on this action. */ - public Builder sportsTeam(SportsTeam sportsTeam) { + @NotNull public Builder sportsTeam(SportsTeam sportsTeam) { this.sportsTeam = sportsTeam; return this; } /** * A sub property of participant. The sports team that participated on this action. */ - public Builder sportsTeam(SportsTeam.Builder sportsTeam) { + @NotNull public Builder sportsTeam(SportsTeam.Builder sportsTeam) { return this.sportsTeam(sportsTeam.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -272,13 +276,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -286,7 +290,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -294,7 +298,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -303,67 +307,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -397,7 +401,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -432,7 +436,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -465,7 +469,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -473,38 +477,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -541,55 +545,55 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder exerciseCourse(Place place); - Builder exerciseCourse(Place.Builder place); - Builder exerciseRelatedDiet(Diet diet); - Builder exerciseRelatedDiet(Diet.Builder diet); - Builder distance(Distance distance); - Builder distance(Distance.Builder distance); - Builder exercisePlan(ExercisePlan exercisePlan); - Builder exercisePlan(ExercisePlan.Builder exercisePlan); - Builder exerciseType(String exerciseType); - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder opponent(Person person); - Builder opponent(Person.Builder person); - Builder sportsActivityLocation(SportsActivityLocation sportsActivityLocation); - Builder sportsActivityLocation(SportsActivityLocation.Builder sportsActivityLocation); - Builder sportsEvent(SportsEvent sportsEvent); - Builder sportsEvent(SportsEvent.Builder sportsEvent); - Builder sportsTeam(SportsTeam sportsTeam); - Builder sportsTeam(SportsTeam.Builder sportsTeam); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder event(Event event); - Builder event(Event.Builder event); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder exerciseCourse(Place place); + @NotNull Builder exerciseCourse(Place.Builder place); + @NotNull Builder exerciseRelatedDiet(Diet diet); + @NotNull Builder exerciseRelatedDiet(Diet.Builder diet); + @NotNull Builder distance(Distance distance); + @NotNull Builder distance(Distance.Builder distance); + @NotNull Builder exercisePlan(ExercisePlan exercisePlan); + @NotNull Builder exercisePlan(ExercisePlan.Builder exercisePlan); + @NotNull Builder exerciseType(String exerciseType); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder opponent(Person person); + @NotNull Builder opponent(Person.Builder person); + @NotNull Builder sportsActivityLocation(SportsActivityLocation sportsActivityLocation); + @NotNull Builder sportsActivityLocation(SportsActivityLocation.Builder sportsActivityLocation); + @NotNull Builder sportsEvent(SportsEvent sportsEvent); + @NotNull Builder sportsEvent(SportsEvent.Builder sportsEvent); + @NotNull Builder sportsTeam(SportsTeam sportsTeam); + @NotNull Builder sportsTeam(SportsTeam.Builder sportsTeam); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ExerciseAction(Place exerciseCourse, Diet exerciseRelatedDiet, Distance distance, ExercisePlan exercisePlan, String exerciseType, Place fromLocation, Person opponent, SportsActivityLocation sportsActivityLocation, SportsEvent sportsEvent, SportsTeam sportsTeam, Place toLocation, Audience audience, Event event, 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) { diff --git a/src/main/java/org/schema/ExerciseGym.java b/src/main/java/org/schema/ExerciseGym.java index 9fb7b366..b6fa5d7d 100644 --- a/src/main/java/org/schema/ExerciseGym.java +++ b/src/main/java/org/schema/ExerciseGym.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A gym. */ @@ -25,7 +29,7 @@ public class ExerciseGym extends SportsActivityLocation { /** * Builder for {@link ExerciseGym} */ - public static final class ExerciseGymThingBuilder implements Builder { + static final class ExerciseGymThingBuilder implements Builder { /** * Creates new {@link ExerciseGym} instance. */ @@ -35,107 +39,107 @@ public ExerciseGym build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ExercisePlan.java b/src/main/java/org/schema/ExercisePlan.java index 5d8f1ce2..40edd711 100644 --- a/src/main/java/org/schema/ExercisePlan.java +++ b/src/main/java/org/schema/ExercisePlan.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Fitness-related activity designed for a specific health-related purpose, including defined exercise routines as well as activity prescribed by a clinician. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -74,7 +78,7 @@ public Energy getWorkload() { /** * Builder for {@link ExercisePlan} */ - public static final class ExercisePlanThingBuilder implements Builder { + static final class ExercisePlanThingBuilder implements Builder { /** * Creates new {@link ExercisePlan} instance. */ @@ -84,56 +88,56 @@ public ExercisePlan build() { /** * Length of time to engage in the activity. */ - public Builder activityDuration(Duration duration) { + @NotNull public Builder activityDuration(Duration duration) { this.activityDuration = duration; return this; } /** * Length of time to engage in the activity. */ - public Builder activityDuration(Duration.Builder duration) { + @NotNull public Builder activityDuration(Duration.Builder duration) { return this.activityDuration(duration.build()); } /** * How often one should engage in the activity. */ - public Builder activityFrequency(String activityFrequency) { + @NotNull public Builder activityFrequency(String activityFrequency) { this.activityFrequency = activityFrequency; return this; } /** * Any additional component of the exercise prescription that may need to be articulated to the patient. This may include the order of exercises, the number of repetitions of movement, quantitative distance, progressions over time, etc. */ - public Builder additionalVariable(String additionalVariable) { + @NotNull public Builder additionalVariable(String additionalVariable) { this.additionalVariable = additionalVariable; return this; } /** * Type(s) of exercise or activity, such as strength training, flexibility training, aerobics, cardiac rehabilitation, etc. */ - public Builder exerciseType(String exerciseType) { + @NotNull public Builder exerciseType(String exerciseType) { this.exerciseType = exerciseType; return this; } /** * Quantitative measure gauging the degree of force involved in the exercise, for example, heartbeats per minute. May include the velocity of the movement. */ - public Builder intensity(String intensity) { + @NotNull public Builder intensity(String intensity) { this.intensity = intensity; return this; } /** * Number of times one should repeat the activity. */ - public Builder repetitions(Integer integer) { + @NotNull public Builder repetitions(int repetitions) { if (this.repetitions == null) this.repetitions = new Number(); - this.repetitions.setInteger(integer); + this.repetitions.setInt(repetitions); return this; } /** * Number of times one should repeat the activity. */ - public Builder repetitions(Long repetitions) { + @NotNull public Builder repetitions(long repetitions) { if (this.repetitions == null) this.repetitions = new Number(); this.repetitions.setLong(repetitions); return this; @@ -141,7 +145,7 @@ public Builder repetitions(Long repetitions) { /** * Number of times one should repeat the activity. */ - public Builder repetitions(Float repetitions) { + @NotNull public Builder repetitions(float repetitions) { if (this.repetitions == null) this.repetitions = new Number(); this.repetitions.setFloat(repetitions); return this; @@ -149,7 +153,7 @@ public Builder repetitions(Float repetitions) { /** * Number of times one should repeat the activity. */ - public Builder repetitions(Double repetitions) { + @NotNull public Builder repetitions(double repetitions) { if (this.repetitions == null) this.repetitions = new Number(); this.repetitions.setDouble(repetitions); return this; @@ -157,7 +161,7 @@ public Builder repetitions(Double repetitions) { /** * Number of times one should repeat the activity. */ - public Builder repetitions(String repetitions) { + @NotNull public Builder repetitions(String repetitions) { if (this.repetitions == null) this.repetitions = new Number(); this.repetitions.setString(repetitions); return this; @@ -165,27 +169,27 @@ public Builder repetitions(String repetitions) { /** * How often one should break from the activity. */ - public Builder restPeriods(String restPeriods) { + @NotNull public Builder restPeriods(String restPeriods) { this.restPeriods = restPeriods; return this; } /** * Quantitative measure of the physiologic output of the exercise; also referred to as energy expenditure. */ - public Builder workload(Energy energy) { + @NotNull public Builder workload(Energy energy) { this.workload = energy; return this; } /** * Quantitative measure of the physiologic output of the exercise; also referred to as energy expenditure. */ - public Builder workload(Energy.Builder energy) { + @NotNull public Builder workload(Energy.Builder energy) { return this.workload(energy.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setAnatomicalStructure(anatomicalStructure); return this; @@ -193,13 +197,13 @@ public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { return this.associatedAnatomy(anatomicalStructure.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { + @NotNull public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setAnatomicalSystem(anatomicalSystem); return this; @@ -207,13 +211,13 @@ public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { + @NotNull public Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { return this.associatedAnatomy(anatomicalSystem.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { + @NotNull public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setSuperficialAnatomy(superficialAnatomy); return this; @@ -221,13 +225,13 @@ public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy) { + @NotNull public Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy) { return this.associatedAnatomy(superficialAnatomy.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -235,13 +239,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -249,7 +253,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -257,184 +261,184 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The characteristics of associated patients, such as age, gender, race etc. */ - public Builder epidemiology(String epidemiology) { + @NotNull public Builder epidemiology(String epidemiology) { this.epidemiology = epidemiology; return this; } /** * Changes in the normal mechanical, physical, and biochemical functions that are associated with this activity or condition. */ - public Builder pathophysiology(String pathophysiology) { + @NotNull public Builder pathophysiology(String pathophysiology) { this.pathophysiology = pathophysiology; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -468,7 +472,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -503,7 +507,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -536,7 +540,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -544,38 +548,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -616,67 +620,67 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder activityDuration(Duration duration); - Builder activityDuration(Duration.Builder duration); - Builder activityFrequency(String activityFrequency); - Builder additionalVariable(String additionalVariable); - Builder exerciseType(String exerciseType); - Builder intensity(String intensity); - Builder repetitions(Integer integer); - Builder repetitions(Long repetitions); - Builder repetitions(Float repetitions); - Builder repetitions(Double repetitions); - Builder repetitions(String repetitions); - Builder restPeriods(String restPeriods); - Builder workload(Energy energy); - Builder workload(Energy.Builder energy); - Builder associatedAnatomy(AnatomicalStructure anatomicalStructure); - Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); - Builder associatedAnatomy(AnatomicalSystem anatomicalSystem); - Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); - Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy); - Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder epidemiology(String epidemiology); - Builder pathophysiology(String pathophysiology); - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder activityDuration(Duration duration); + @NotNull Builder activityDuration(Duration.Builder duration); + @NotNull Builder activityFrequency(String activityFrequency); + @NotNull Builder additionalVariable(String additionalVariable); + @NotNull Builder exerciseType(String exerciseType); + @NotNull Builder intensity(String intensity); + @NotNull Builder repetitions(int repetitions); + @NotNull Builder repetitions(long repetitions); + @NotNull Builder repetitions(float repetitions); + @NotNull Builder repetitions(double repetitions); + @NotNull Builder repetitions(String repetitions); + @NotNull Builder restPeriods(String restPeriods); + @NotNull Builder workload(Energy energy); + @NotNull Builder workload(Energy.Builder energy); + @NotNull Builder associatedAnatomy(AnatomicalStructure anatomicalStructure); + @NotNull Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder associatedAnatomy(AnatomicalSystem anatomicalSystem); + @NotNull Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); + @NotNull Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy); + @NotNull Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder epidemiology(String epidemiology); + @NotNull Builder pathophysiology(String pathophysiology); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ExercisePlan(Duration activityDuration, String activityFrequency, String additionalVariable, String exerciseType, String intensity, Number repetitions, String restPeriods, Energy workload, AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy associatedAnatomy, PhysicalActivityCategoryOrStringOrThing category, String epidemiology, String pathophysiology, 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) { diff --git a/src/main/java/org/schema/Eye.java b/src/main/java/org/schema/Eye.java index ddf60086..e5a229a7 100644 --- a/src/main/java/org/schema/Eye.java +++ b/src/main/java/org/schema/Eye.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Eye. */ @@ -25,7 +29,7 @@ public class Eye { /** * Builder for {@link Eye} */ - public static final class EyeThingBuilder implements Builder { + static final class EyeThingBuilder implements Builder { /** * Creates new {@link Eye} instance. */ @@ -34,7 +38,7 @@ public Eye build() { } } public interface Builder extends ThingBuilder { - + } protected Eye() { diff --git a/src/main/java/org/schema/FDAcategoryA.java b/src/main/java/org/schema/FDAcategoryA.java index 89a61c16..40dc067b 100644 --- a/src/main/java/org/schema/FDAcategoryA.java +++ b/src/main/java/org/schema/FDAcategoryA.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A designation by the US FDA signifying that adequate and well-controlled studies have failed to demonstrate a risk to the fetus in the first trimester of pregnancy (and there is no evidence of risk in later trimesters). */ @@ -25,7 +29,7 @@ public class FDAcategoryA { /** * Builder for {@link FDAcategoryA} */ - public static final class FDAcategoryAThingBuilder implements Builder { + static final class FDAcategoryAThingBuilder implements Builder { /** * Creates new {@link FDAcategoryA} instance. */ @@ -34,7 +38,7 @@ public FDAcategoryA build() { } } public interface Builder extends ThingBuilder { - + } protected FDAcategoryA() { diff --git a/src/main/java/org/schema/FDAcategoryB.java b/src/main/java/org/schema/FDAcategoryB.java index 61cfd85a..d8548fc2 100644 --- a/src/main/java/org/schema/FDAcategoryB.java +++ b/src/main/java/org/schema/FDAcategoryB.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A designation by the US FDA signifying that animal reproduction studies have failed to demonstrate a risk to the fetus and there are no adequate and well-controlled studies in pregnant women. */ @@ -25,7 +29,7 @@ public class FDAcategoryB { /** * Builder for {@link FDAcategoryB} */ - public static final class FDAcategoryBThingBuilder implements Builder { + static final class FDAcategoryBThingBuilder implements Builder { /** * Creates new {@link FDAcategoryB} instance. */ @@ -34,7 +38,7 @@ public FDAcategoryB build() { } } public interface Builder extends ThingBuilder { - + } protected FDAcategoryB() { diff --git a/src/main/java/org/schema/FDAcategoryC.java b/src/main/java/org/schema/FDAcategoryC.java index 37112057..2a2781ee 100644 --- a/src/main/java/org/schema/FDAcategoryC.java +++ b/src/main/java/org/schema/FDAcategoryC.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A designation by the US FDA signifying that animal reproduction studies have shown an adverse effect on the fetus and there are no adequate and well-controlled studies in humans, but potential benefits may warrant use of the drug in pregnant women despite potential risks. */ @@ -25,7 +29,7 @@ public class FDAcategoryC { /** * Builder for {@link FDAcategoryC} */ - public static final class FDAcategoryCThingBuilder implements Builder { + static final class FDAcategoryCThingBuilder implements Builder { /** * Creates new {@link FDAcategoryC} instance. */ @@ -34,7 +38,7 @@ public FDAcategoryC build() { } } public interface Builder extends ThingBuilder { - + } protected FDAcategoryC() { diff --git a/src/main/java/org/schema/FDAcategoryD.java b/src/main/java/org/schema/FDAcategoryD.java index 27af95df..587c2ab2 100644 --- a/src/main/java/org/schema/FDAcategoryD.java +++ b/src/main/java/org/schema/FDAcategoryD.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A designation by the US FDA signifying that there is positive evidence of human fetal risk based on adverse reaction data from investigational or marketing experience or studies in humans, but potential benefits may warrant use of the drug in pregnant women despite potential risks. */ @@ -25,7 +29,7 @@ public class FDAcategoryD { /** * Builder for {@link FDAcategoryD} */ - public static final class FDAcategoryDThingBuilder implements Builder { + static final class FDAcategoryDThingBuilder implements Builder { /** * Creates new {@link FDAcategoryD} instance. */ @@ -34,7 +38,7 @@ public FDAcategoryD build() { } } public interface Builder extends ThingBuilder { - + } protected FDAcategoryD() { diff --git a/src/main/java/org/schema/FDAcategoryX.java b/src/main/java/org/schema/FDAcategoryX.java index d1d6c418..6cd42579 100644 --- a/src/main/java/org/schema/FDAcategoryX.java +++ b/src/main/java/org/schema/FDAcategoryX.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A designation by the US FDA signifying that studies in animals or humans have demonstrated fetal abnormalities and/or there is positive evidence of human fetal risk based on adverse reaction data from investigational or marketing experience, and the risks involved in use of the drug in pregnant women clearly outweigh potential benefits. */ @@ -25,7 +29,7 @@ public class FDAcategoryX { /** * Builder for {@link FDAcategoryX} */ - public static final class FDAcategoryXThingBuilder implements Builder { + static final class FDAcategoryXThingBuilder implements Builder { /** * Creates new {@link FDAcategoryX} instance. */ @@ -34,7 +38,7 @@ public FDAcategoryX build() { } } public interface Builder extends ThingBuilder { - + } protected FDAcategoryX() { diff --git a/src/main/java/org/schema/FDAnotEvaluated.java b/src/main/java/org/schema/FDAnotEvaluated.java index 965a2e9d..3b01ed17 100644 --- a/src/main/java/org/schema/FDAnotEvaluated.java +++ b/src/main/java/org/schema/FDAnotEvaluated.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A designation that the drug in question has not been assigned a pregnancy category designation by the US FDA. */ @@ -25,7 +29,7 @@ public class FDAnotEvaluated { /** * Builder for {@link FDAnotEvaluated} */ - public static final class FDAnotEvaluatedThingBuilder implements Builder { + static final class FDAnotEvaluatedThingBuilder implements Builder { /** * Creates new {@link FDAnotEvaluated} instance. */ @@ -34,7 +38,7 @@ public FDAnotEvaluated build() { } } public interface Builder extends ThingBuilder { - + } protected FDAnotEvaluated() { diff --git a/src/main/java/org/schema/FailedActionStatus.java b/src/main/java/org/schema/FailedActionStatus.java index f8a17519..185782ef 100644 --- a/src/main/java/org/schema/FailedActionStatus.java +++ b/src/main/java/org/schema/FailedActionStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An action that failed to complete. The action's error property and the HTTP return code contain more information about the failure. */ @@ -25,7 +29,7 @@ public class FailedActionStatus { /** * Builder for {@link FailedActionStatus} */ - public static final class FailedActionStatusThingBuilder implements Builder { + static final class FailedActionStatusThingBuilder implements Builder { /** * Creates new {@link FailedActionStatus} instance. */ @@ -34,7 +38,7 @@ public FailedActionStatus build() { } } public interface Builder extends ThingBuilder { - + } protected FailedActionStatus() { diff --git a/src/main/java/org/schema/FastFoodRestaurant.java b/src/main/java/org/schema/FastFoodRestaurant.java index a03dc4df..154349d3 100644 --- a/src/main/java/org/schema/FastFoodRestaurant.java +++ b/src/main/java/org/schema/FastFoodRestaurant.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A fast-food restaurant. */ @@ -25,7 +29,7 @@ public class FastFoodRestaurant extends FoodEstablishment { /** * Builder for {@link FastFoodRestaurant} */ - public static final class FastFoodRestaurantThingBuilder implements Builder { + static final class FastFoodRestaurantThingBuilder implements Builder { /** * Creates new {@link FastFoodRestaurant} instance. */ @@ -35,7 +39,7 @@ public FastFoodRestaurant build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -43,7 +47,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -51,121 +55,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -527,60 +531,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Festival.java b/src/main/java/org/schema/Festival.java index d4fd3999..a4c99c73 100644 --- a/src/main/java/org/schema/Festival.java +++ b/src/main/java/org/schema/Festival.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Festival. */ @@ -25,7 +29,7 @@ public class Festival extends Event { /** * Builder for {@link Festival} */ - public static final class FestivalThingBuilder implements Builder { + static final class FestivalThingBuilder implements Builder { /** * Creates new {@link Festival} instance. */ @@ -35,20 +39,20 @@ public Festival build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/FilmAction.java b/src/main/java/org/schema/FilmAction.java index 937de9e9..d374125f 100644 --- a/src/main/java/org/schema/FilmAction.java +++ b/src/main/java/org/schema/FilmAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of capturing sound and moving images on film, video, or digitally. */ @@ -25,7 +29,7 @@ public class FilmAction extends CreateAction { /** * Builder for {@link FilmAction} */ - public static final class FilmActionThingBuilder implements Builder { + static final class FilmActionThingBuilder implements Builder { /** * Creates new {@link FilmAction} instance. */ @@ -35,7 +39,7 @@ public FilmAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/FinancialService.java b/src/main/java/org/schema/FinancialService.java index d3cce27a..09467078 100644 --- a/src/main/java/org/schema/FinancialService.java +++ b/src/main/java/org/schema/FinancialService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Financial services business. */ @@ -25,7 +29,7 @@ public class FinancialService extends LocalBusiness { /** * Builder for {@link FinancialService} */ - public static final class FinancialServiceThingBuilder implements Builder { + static final class FinancialServiceThingBuilder implements Builder { /** * Creates new {@link FinancialService} instance. */ @@ -35,107 +39,107 @@ public FinancialService build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/FindAction.java b/src/main/java/org/schema/FindAction.java index ab9c3475..d748789b 100644 --- a/src/main/java/org/schema/FindAction.java +++ b/src/main/java/org/schema/FindAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of finding an object.

Related actions:

  • SearchAction: FindAction is generally lead by a SearchAction, but not necessarily
. */ @@ -25,7 +29,7 @@ public class FindAction extends Action { /** * Builder for {@link FindAction} */ - public static final class FindActionThingBuilder implements Builder { + static final class FindActionThingBuilder implements Builder { /** * Creates new {@link FindAction} instance. */ @@ -35,7 +39,7 @@ public FindAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/FireStation.java b/src/main/java/org/schema/FireStation.java index 9d12ae21..e2a3962b 100644 --- a/src/main/java/org/schema/FireStation.java +++ b/src/main/java/org/schema/FireStation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A fire station. With firemen. */ @@ -25,7 +29,7 @@ public class FireStation extends EmergencyService { /** * Builder for {@link FireStation} */ - public static final class FireStationThingBuilder implements Builder { + static final class FireStationThingBuilder implements Builder { /** * Creates new {@link FireStation} instance. */ @@ -35,107 +39,107 @@ public FireStation build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Flexibility.java b/src/main/java/org/schema/Flexibility.java index 8088578e..e17a8b2a 100644 --- a/src/main/java/org/schema/Flexibility.java +++ b/src/main/java/org/schema/Flexibility.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Physical activity that is engaged in to improve joint and muscle flexibility. */ @@ -25,7 +29,7 @@ public class Flexibility { /** * Builder for {@link Flexibility} */ - public static final class FlexibilityThingBuilder implements Builder { + static final class FlexibilityThingBuilder implements Builder { /** * Creates new {@link Flexibility} instance. */ @@ -34,7 +38,7 @@ public Flexibility build() { } } public interface Builder extends ThingBuilder { - + } protected Flexibility() { diff --git a/src/main/java/org/schema/Flight.java b/src/main/java/org/schema/Flight.java index e2eb1fda..8cea5130 100644 --- a/src/main/java/org/schema/Flight.java +++ b/src/main/java/org/schema/Flight.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An airline flight. */ @@ -43,14 +47,14 @@ public String getFlightNumber() { /** * The expected departure time. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDepartureTime() { return myDepartureTime; } /** * The expected arrival time. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getArrivalTime() { return myArrivalTime; } @@ -123,14 +127,14 @@ public DistanceOrString getFlightDistance() { /** * The time when a passenger can check into the flight online. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getWebCheckinTime() { return myWebCheckinTime; } /** * Builder for {@link Flight} */ - public static final class FlightThingBuilder implements Builder { + static final class FlightThingBuilder implements Builder { /** * Creates new {@link Flight} instance. */ @@ -140,14 +144,14 @@ public Flight build() { /** * An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider. */ - public Builder seller(Participant participant) { + @NotNull public Builder seller(Participant participant) { this.seller = participant; return this; } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -155,13 +159,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -169,101 +173,101 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The unique identifier for a flight including the airline IATA code. For example, if describing United flight 110, where the IATA code for United is 'UA', the flightNumber is 'UA110'. */ - public Builder flightNumber(String flightNumber) { + @NotNull public Builder flightNumber(String flightNumber) { this.flightNumber = flightNumber; return this; } /** * The expected departure time. */ - public Builder departureTime(java.util.Date date) { + @NotNull public Builder departureTime(java.util.Date date) { this.departureTime = date; return this; } /** * The expected arrival time. */ - public Builder arrivalTime(java.util.Date date) { + @NotNull public Builder arrivalTime(java.util.Date date) { this.arrivalTime = date; return this; } /** * The airport where the flight originates. */ - public Builder departureAirport(Airport airport) { + @NotNull public Builder departureAirport(Airport airport) { this.departureAirport = airport; return this; } /** * The airport where the flight originates. */ - public Builder departureAirport(Airport.Builder airport) { + @NotNull public Builder departureAirport(Airport.Builder airport) { return this.departureAirport(airport.build()); } /** * The airport where the flight terminates. */ - public Builder arrivalAirport(Airport airport) { + @NotNull public Builder arrivalAirport(Airport airport) { this.arrivalAirport = airport; return this; } /** * The airport where the flight terminates. */ - public Builder arrivalAirport(Airport.Builder airport) { + @NotNull public Builder arrivalAirport(Airport.Builder airport) { return this.arrivalAirport(airport.build()); } /** * Identifier of the flight's departure gate. */ - public Builder departureGate(String departureGate) { + @NotNull public Builder departureGate(String departureGate) { this.departureGate = departureGate; return this; } /** * Identifier of the flight's arrival gate. */ - public Builder arrivalGate(String arrivalGate) { + @NotNull public Builder arrivalGate(String arrivalGate) { this.arrivalGate = arrivalGate; return this; } /** * The type of boarding policy used by the airline (e.g. zone-based or group-based). */ - public Builder boardingPolicy(BoardingPolicyType boardingPolicyType) { + @NotNull public Builder boardingPolicy(BoardingPolicyType boardingPolicyType) { this.boardingPolicy = boardingPolicyType; return this; } /** * The type of boarding policy used by the airline (e.g. zone-based or group-based). */ - public Builder boardingPolicy(BoardingPolicyType.Builder boardingPolicyType) { + @NotNull public Builder boardingPolicy(BoardingPolicyType.Builder boardingPolicyType) { return this.boardingPolicy(boardingPolicyType.build()); } /** * Identifier of the flight's departure terminal. */ - public Builder departureTerminal(String departureTerminal) { + @NotNull public Builder departureTerminal(String departureTerminal) { this.departureTerminal = departureTerminal; return this; } /** * Identifier of the flight's arrival terminal. */ - public Builder arrivalTerminal(String arrivalTerminal) { + @NotNull public Builder arrivalTerminal(String arrivalTerminal) { this.arrivalTerminal = arrivalTerminal; return this; } /** * The kind of aircraft (e.g., "Boeing 747"). */ - public Builder aircraft(String aircraft) { + @NotNull public Builder aircraft(String aircraft) { if (this.aircraft == null) this.aircraft = new StringOrVehicle(); this.aircraft.setString(aircraft); return this; @@ -271,7 +275,7 @@ public Builder aircraft(String aircraft) { /** * The kind of aircraft (e.g., "Boeing 747"). */ - public Builder aircraft(Vehicle vehicle) { + @NotNull public Builder aircraft(Vehicle vehicle) { if (this.aircraft == null) this.aircraft = new StringOrVehicle(); this.aircraft.setVehicle(vehicle); return this; @@ -279,20 +283,20 @@ public Builder aircraft(Vehicle vehicle) { /** * The kind of aircraft (e.g., "Boeing 747"). */ - public Builder aircraft(Vehicle.Builder vehicle) { + @NotNull public Builder aircraft(Vehicle.Builder vehicle) { return this.aircraft(vehicle.build()); } /** * Description of the meals that will be provided or available for purchase. */ - public Builder mealService(String mealService) { + @NotNull public Builder mealService(String mealService) { this.mealService = mealService; return this; } /** * The estimated time the flight will take. */ - public Builder estimatedFlightDuration(Duration duration) { + @NotNull public Builder estimatedFlightDuration(Duration duration) { if (this.estimatedFlightDuration == null) this.estimatedFlightDuration = new DurationOrString(); this.estimatedFlightDuration.setDuration(duration); return this; @@ -300,13 +304,13 @@ public Builder estimatedFlightDuration(Duration duration) { /** * The estimated time the flight will take. */ - public Builder estimatedFlightDuration(Duration.Builder duration) { + @NotNull public Builder estimatedFlightDuration(Duration.Builder duration) { return this.estimatedFlightDuration(duration.build()); } /** * The estimated time the flight will take. */ - public Builder estimatedFlightDuration(String estimatedFlightDuration) { + @NotNull public Builder estimatedFlightDuration(String estimatedFlightDuration) { if (this.estimatedFlightDuration == null) this.estimatedFlightDuration = new DurationOrString(); this.estimatedFlightDuration.setString(estimatedFlightDuration); return this; @@ -314,7 +318,7 @@ public Builder estimatedFlightDuration(String estimatedFlightDuration) { /** * The distance of the flight. */ - public Builder flightDistance(Distance distance) { + @NotNull public Builder flightDistance(Distance distance) { if (this.flightDistance == null) this.flightDistance = new DistanceOrString(); this.flightDistance.setDistance(distance); return this; @@ -322,13 +326,13 @@ public Builder flightDistance(Distance distance) { /** * The distance of the flight. */ - public Builder flightDistance(Distance.Builder distance) { + @NotNull public Builder flightDistance(Distance.Builder distance) { return this.flightDistance(distance.build()); } /** * The distance of the flight. */ - public Builder flightDistance(String flightDistance) { + @NotNull public Builder flightDistance(String flightDistance) { if (this.flightDistance == null) this.flightDistance = new DistanceOrString(); this.flightDistance.setString(flightDistance); return this; @@ -336,28 +340,28 @@ public Builder flightDistance(String flightDistance) { /** * The time when a passenger can check into the flight online. */ - public Builder webCheckinTime(java.util.Date date) { + @NotNull public Builder webCheckinTime(java.util.Date date) { this.webCheckinTime = date; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -391,7 +395,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -426,7 +430,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -459,7 +463,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -467,38 +471,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -533,47 +537,47 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder seller(Participant participant); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder flightNumber(String flightNumber); - Builder departureTime(java.util.Date date); - Builder arrivalTime(java.util.Date date); - Builder departureAirport(Airport airport); - Builder departureAirport(Airport.Builder airport); - Builder arrivalAirport(Airport airport); - Builder arrivalAirport(Airport.Builder airport); - Builder departureGate(String departureGate); - Builder arrivalGate(String arrivalGate); - Builder boardingPolicy(BoardingPolicyType boardingPolicyType); - Builder boardingPolicy(BoardingPolicyType.Builder boardingPolicyType); - Builder departureTerminal(String departureTerminal); - Builder arrivalTerminal(String arrivalTerminal); - Builder aircraft(String aircraft); - Builder aircraft(Vehicle vehicle); - Builder aircraft(Vehicle.Builder vehicle); - Builder mealService(String mealService); - Builder estimatedFlightDuration(Duration duration); - Builder estimatedFlightDuration(Duration.Builder duration); - Builder estimatedFlightDuration(String estimatedFlightDuration); - Builder flightDistance(Distance distance); - Builder flightDistance(Distance.Builder distance); - Builder flightDistance(String flightDistance); - Builder webCheckinTime(java.util.Date date); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder seller(Participant participant); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder flightNumber(String flightNumber); + @NotNull Builder departureTime(java.util.Date date); + @NotNull Builder arrivalTime(java.util.Date date); + @NotNull Builder departureAirport(Airport airport); + @NotNull Builder departureAirport(Airport.Builder airport); + @NotNull Builder arrivalAirport(Airport airport); + @NotNull Builder arrivalAirport(Airport.Builder airport); + @NotNull Builder departureGate(String departureGate); + @NotNull Builder arrivalGate(String arrivalGate); + @NotNull Builder boardingPolicy(BoardingPolicyType boardingPolicyType); + @NotNull Builder boardingPolicy(BoardingPolicyType.Builder boardingPolicyType); + @NotNull Builder departureTerminal(String departureTerminal); + @NotNull Builder arrivalTerminal(String arrivalTerminal); + @NotNull Builder aircraft(String aircraft); + @NotNull Builder aircraft(Vehicle vehicle); + @NotNull Builder aircraft(Vehicle.Builder vehicle); + @NotNull Builder mealService(String mealService); + @NotNull Builder estimatedFlightDuration(Duration duration); + @NotNull Builder estimatedFlightDuration(Duration.Builder duration); + @NotNull Builder estimatedFlightDuration(String estimatedFlightDuration); + @NotNull Builder flightDistance(Distance distance); + @NotNull Builder flightDistance(Distance.Builder distance); + @NotNull Builder flightDistance(String flightDistance); + @NotNull Builder webCheckinTime(java.util.Date date); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Flight(Participant seller, OrganizationOrPerson provider, String flightNumber, java.util.Date departureTime, java.util.Date arrivalTime, Airport departureAirport, Airport arrivalAirport, String departureGate, String arrivalGate, BoardingPolicyType boardingPolicy, String departureTerminal, String arrivalTerminal, StringOrVehicle aircraft, String mealService, DurationOrString estimatedFlightDuration, DistanceOrString flightDistance, java.util.Date webCheckinTime, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/FlightReservation.java b/src/main/java/org/schema/FlightReservation.java index 7cfef63f..3f1dc77f 100644 --- a/src/main/java/org/schema/FlightReservation.java +++ b/src/main/java/org/schema/FlightReservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservation for air travel.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use http://schema.org/Offer. */ @@ -49,7 +53,7 @@ public QualitativeValueOrString getPassengerPriorityStatus() { /** * Builder for {@link FlightReservation} */ - public static final class FlightReservationThingBuilder implements Builder { + static final class FlightReservationThingBuilder implements Builder { /** * Creates new {@link FlightReservation} instance. */ @@ -59,28 +63,28 @@ public FlightReservation build() { /** * The airline-specific indicator of boarding order / preference. */ - public Builder boardingGroup(String boardingGroup) { + @NotNull public Builder boardingGroup(String boardingGroup) { this.boardingGroup = boardingGroup; return this; } /** * The passenger's sequence number as assigned by the airline. */ - public Builder passengerSequenceNumber(String passengerSequenceNumber) { + @NotNull public Builder passengerSequenceNumber(String passengerSequenceNumber) { this.passengerSequenceNumber = passengerSequenceNumber; return this; } /** * The type of security screening the passenger is subject to. */ - public Builder securityScreening(String securityScreening) { + @NotNull public Builder securityScreening(String securityScreening) { this.securityScreening = securityScreening; return this; } /** * The priority status assigned to a passenger for security or boarding (e.g. FastTrack or Priority). */ - public Builder passengerPriorityStatus(QualitativeValue qualitativeValue) { + @NotNull public Builder passengerPriorityStatus(QualitativeValue qualitativeValue) { if (this.passengerPriorityStatus == null) this.passengerPriorityStatus = new QualitativeValueOrString(); this.passengerPriorityStatus.setQualitativeValue(qualitativeValue); return this; @@ -88,13 +92,13 @@ public Builder passengerPriorityStatus(QualitativeValue qualitativeValue) { /** * The priority status assigned to a passenger for security or boarding (e.g. FastTrack or Priority). */ - public Builder passengerPriorityStatus(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder passengerPriorityStatus(QualitativeValue.Builder qualitativeValue) { return this.passengerPriorityStatus(qualitativeValue.build()); } /** * The priority status assigned to a passenger for security or boarding (e.g. FastTrack or Priority). */ - public Builder passengerPriorityStatus(String passengerPriorityStatus) { + @NotNull public Builder passengerPriorityStatus(String passengerPriorityStatus) { if (this.passengerPriorityStatus == null) this.passengerPriorityStatus = new QualitativeValueOrString(); this.passengerPriorityStatus.setString(passengerPriorityStatus); return this; @@ -102,40 +106,40 @@ public Builder passengerPriorityStatus(String passengerPriorityStatus) { /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -143,13 +147,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -157,13 +161,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -171,13 +175,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -185,53 +189,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -239,7 +243,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -247,13 +251,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -261,14 +265,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -276,13 +280,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -290,27 +294,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -344,7 +348,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -379,7 +383,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -412,7 +416,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -420,38 +424,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -485,52 +489,52 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder boardingGroup(String boardingGroup); - Builder passengerSequenceNumber(String passengerSequenceNumber); - Builder securityScreening(String securityScreening); - Builder passengerPriorityStatus(QualitativeValue qualitativeValue); - Builder passengerPriorityStatus(QualitativeValue.Builder qualitativeValue); - Builder passengerPriorityStatus(String passengerPriorityStatus); - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder boardingGroup(String boardingGroup); + @NotNull Builder passengerSequenceNumber(String passengerSequenceNumber); + @NotNull Builder securityScreening(String securityScreening); + @NotNull Builder passengerPriorityStatus(QualitativeValue qualitativeValue); + @NotNull Builder passengerPriorityStatus(QualitativeValue.Builder qualitativeValue); + @NotNull Builder passengerPriorityStatus(String passengerPriorityStatus); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/Florist.java b/src/main/java/org/schema/Florist.java index c86bfc1c..c8553433 100644 --- a/src/main/java/org/schema/Florist.java +++ b/src/main/java/org/schema/Florist.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A florist. */ @@ -25,7 +29,7 @@ public class Florist extends Store { /** * Builder for {@link Florist} */ - public static final class FloristThingBuilder implements Builder { + static final class FloristThingBuilder implements Builder { /** * Creates new {@link Florist} instance. */ @@ -35,107 +39,107 @@ public Florist build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/FollowAction.java b/src/main/java/org/schema/FollowAction.java index 6dcad298..f265744c 100644 --- a/src/main/java/org/schema/FollowAction.java +++ b/src/main/java/org/schema/FollowAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of forming a personal connection with someone/something (object) unidirectionally/asymmetrically to get updates polled from.

Related actions:

  • BefriendAction: Unlike BefriendAction, FollowAction implies that the connection is *not* necessarily reciprocal.
  • SubscribeAction: Unlike SubscribeAction, FollowAction implies that the follower acts as an active agent constantly/actively polling for updates.
  • RegisterAction: Unlike RegisterAction, FollowAction implies that the agent is interested in continuing receiving updates from the object.
  • JoinAction: Unlike JoinAction, FollowAction implies that the agent is interested in getting updates from the object.
  • TrackAction: Unlike TrackAction, FollowAction refers to the polling of updates of all aspects of animate objects rather than the location of inanimate objects (e.g. you track a package, but you don't follow it)
. */ @@ -31,7 +35,7 @@ public OrganizationOrPerson getFollowee() { /** * Builder for {@link FollowAction} */ - public static final class FollowActionThingBuilder implements Builder { + static final class FollowActionThingBuilder implements Builder { /** * Creates new {@link FollowAction} instance. */ @@ -41,7 +45,7 @@ public FollowAction build() { /** * A sub property of object. The person or organization being followed. */ - public Builder followee(Organization organization) { + @NotNull public Builder followee(Organization organization) { if (this.followee == null) this.followee = new OrganizationOrPerson(); this.followee.setOrganization(organization); return this; @@ -49,13 +53,13 @@ public Builder followee(Organization organization) { /** * A sub property of object. The person or organization being followed. */ - public Builder followee(Organization.Builder organization) { + @NotNull public Builder followee(Organization.Builder organization) { return this.followee(organization.build()); } /** * A sub property of object. The person or organization being followed. */ - public Builder followee(Person person) { + @NotNull public Builder followee(Person person) { if (this.followee == null) this.followee = new OrganizationOrPerson(); this.followee.setPerson(person); return this; @@ -63,13 +67,13 @@ public Builder followee(Person person) { /** * A sub property of object. The person or organization being followed. */ - public Builder followee(Person.Builder person) { + @NotNull public Builder followee(Person.Builder person) { return this.followee(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -77,13 +81,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -91,7 +95,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -99,7 +103,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -108,67 +112,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -202,7 +206,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -237,7 +241,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -270,7 +274,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -278,38 +282,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -334,34 +338,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder followee(Organization organization); - Builder followee(Organization.Builder organization); - Builder followee(Person person); - Builder followee(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder followee(Organization organization); + @NotNull Builder followee(Organization.Builder organization); + @NotNull Builder followee(Person person); + @NotNull Builder followee(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected FollowAction(OrganizationOrPerson followee, 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) { diff --git a/src/main/java/org/schema/FoodEstablishment.java b/src/main/java/org/schema/FoodEstablishment.java index 3d61a16f..1fb441a3 100644 --- a/src/main/java/org/schema/FoodEstablishment.java +++ b/src/main/java/org/schema/FoodEstablishment.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A food-related business. */ @@ -43,7 +47,7 @@ public String getServesCuisine() { /** * Builder for {@link FoodEstablishment} */ - public static final class FoodEstablishmentThingBuilder implements Builder { + static final class FoodEstablishmentThingBuilder implements Builder { /** * Creates new {@link FoodEstablishment} instance. */ @@ -53,7 +57,7 @@ public FoodEstablishment build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -61,7 +65,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -69,121 +73,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -191,13 +195,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -205,27 +209,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -233,13 +237,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -247,7 +251,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -255,13 +259,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -269,20 +273,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -290,13 +294,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -304,26 +308,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -333,7 +337,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -343,27 +347,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -397,7 +401,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -432,7 +436,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -465,7 +469,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -473,38 +477,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -545,60 +549,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected FoodEstablishment(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) { diff --git a/src/main/java/org/schema/FoodEstablishmentOrPlace.java b/src/main/java/org/schema/FoodEstablishmentOrPlace.java index 80988e41..0ed08d89 100644 --- a/src/main/java/org/schema/FoodEstablishmentOrPlace.java +++ b/src/main/java/org/schema/FoodEstablishmentOrPlace.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class FoodEstablishmentOrPlace { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myFoodEstablishment != null) return myFoodEstablishment; if (myPlace != null) return myPlace; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setFoodEstablishment(FoodEstablishment foodEstablishment) { clear(); myFoodEstablishment = foodEstablishment; } public FoodEstablishment getFoodEstablishment() { return myFoodEstablishment; } - private FoodEstablishment myFoodEstablishment; public void setPlace(Place place) { clear(); myPlace = place; } public Place getPlace() { return myPlace; } + private FoodEstablishment myFoodEstablishment; private Place myPlace; private void clear() { myFoodEstablishment = null; diff --git a/src/main/java/org/schema/FoodEstablishmentReservation.java b/src/main/java/org/schema/FoodEstablishmentReservation.java index c47534f0..bd579492 100644 --- a/src/main/java/org/schema/FoodEstablishmentReservation.java +++ b/src/main/java/org/schema/FoodEstablishmentReservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservation to dine at a food-related business.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. */ @@ -27,20 +31,20 @@ public class FoodEstablishmentReservation extends Reservation { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getStartTime() { return myStartTime; } /** * Number of people the reservation should accommodate. */ - public IntegerOrQuantitativeValue getPartySize() { + public QuantitativeValueOrInt getPartySize() { return myPartySize; } /** * Builder for {@link FoodEstablishmentReservation} */ - public static final class FoodEstablishmentReservationThingBuilder implements Builder { + static final class FoodEstablishmentReservationThingBuilder implements Builder { /** * Creates new {@link FoodEstablishmentReservation} instance. */ @@ -52,69 +56,69 @@ public FoodEstablishmentReservation build() { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Number of people the reservation should accommodate. */ - public Builder partySize(Integer integer) { - if (this.partySize == null) this.partySize = new IntegerOrQuantitativeValue(); - this.partySize.setInteger(integer); + @NotNull public Builder partySize(QuantitativeValue quantitativeValue) { + if (this.partySize == null) this.partySize = new QuantitativeValueOrInt(); + this.partySize.setQuantitativeValue(quantitativeValue); return this; } /** * Number of people the reservation should accommodate. */ - public Builder partySize(QuantitativeValue quantitativeValue) { - if (this.partySize == null) this.partySize = new IntegerOrQuantitativeValue(); - this.partySize.setQuantitativeValue(quantitativeValue); - return this; + @NotNull public Builder partySize(QuantitativeValue.Builder quantitativeValue) { + return this.partySize(quantitativeValue.build()); } /** * Number of people the reservation should accommodate. */ - public Builder partySize(QuantitativeValue.Builder quantitativeValue) { - return this.partySize(quantitativeValue.build()); + @NotNull public Builder partySize(int partySize) { + if (this.partySize == null) this.partySize = new QuantitativeValueOrInt(); + this.partySize.setInt(partySize); + return this; } /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -122,13 +126,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -136,13 +140,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -150,13 +154,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -164,53 +168,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -218,7 +222,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -226,13 +230,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -240,14 +244,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -255,13 +259,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -269,27 +273,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -323,7 +327,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -358,7 +362,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -391,7 +395,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -399,38 +403,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -438,7 +442,7 @@ public Builder id(long id) { return id(Long.toString(id)); } private java.util.Date startTime; - private IntegerOrQuantitativeValue partySize; + private QuantitativeValueOrInt partySize; private String reservationId; private ReservationStatusType reservationStatus; private Thing reservationFor; @@ -462,57 +466,57 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder startTime(java.util.Date date); - Builder partySize(Integer integer); - Builder partySize(QuantitativeValue quantitativeValue); - Builder partySize(QuantitativeValue.Builder quantitativeValue); - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder partySize(QuantitativeValue quantitativeValue); + @NotNull Builder partySize(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder partySize(int partySize); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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, QuantitativeValueOrInt 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) { 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; } private java.util.Date myStartTime; - private IntegerOrQuantitativeValue myPartySize; + private QuantitativeValueOrInt myPartySize; } diff --git a/src/main/java/org/schema/FoodEvent.java b/src/main/java/org/schema/FoodEvent.java index 803422ec..abb1758a 100644 --- a/src/main/java/org/schema/FoodEvent.java +++ b/src/main/java/org/schema/FoodEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Food event. */ @@ -25,7 +29,7 @@ public class FoodEvent extends Event { /** * Builder for {@link FoodEvent} */ - public static final class FoodEventThingBuilder implements Builder { + static final class FoodEventThingBuilder implements Builder { /** * Creates new {@link FoodEvent} instance. */ @@ -35,20 +39,20 @@ public FoodEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/FourWheelDriveConfiguration.java b/src/main/java/org/schema/FourWheelDriveConfiguration.java index 32ab9009..b9b974bb 100644 --- a/src/main/java/org/schema/FourWheelDriveConfiguration.java +++ b/src/main/java/org/schema/FourWheelDriveConfiguration.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Four-wheel drive is a transmission layout where the engine primarily drives two wheels with a part-time four-wheel drive capability. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class FourWheelDriveConfiguration { /** * Builder for {@link FourWheelDriveConfiguration} */ - public static final class FourWheelDriveConfigurationThingBuilder implements Builder { + static final class FourWheelDriveConfigurationThingBuilder implements Builder { /** * Creates new {@link FourWheelDriveConfiguration} instance. */ @@ -35,7 +39,7 @@ public FourWheelDriveConfiguration build() { } } public interface Builder extends ThingBuilder { - + } protected FourWheelDriveConfiguration() { diff --git a/src/main/java/org/schema/FrontWheelDriveConfiguration.java b/src/main/java/org/schema/FrontWheelDriveConfiguration.java index 4c080f9e..6d607bd8 100644 --- a/src/main/java/org/schema/FrontWheelDriveConfiguration.java +++ b/src/main/java/org/schema/FrontWheelDriveConfiguration.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Front-wheel drive is a transmission layout where the engine drives the front wheels. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class FrontWheelDriveConfiguration { /** * Builder for {@link FrontWheelDriveConfiguration} */ - public static final class FrontWheelDriveConfigurationThingBuilder implements Builder { + static final class FrontWheelDriveConfigurationThingBuilder implements Builder { /** * Creates new {@link FrontWheelDriveConfiguration} instance. */ @@ -35,7 +39,7 @@ public FrontWheelDriveConfiguration build() { } } public interface Builder extends ThingBuilder { - + } protected FrontWheelDriveConfiguration() { diff --git a/src/main/java/org/schema/Fungus.java b/src/main/java/org/schema/Fungus.java index af56e631..a4a4f8f1 100644 --- a/src/main/java/org/schema/Fungus.java +++ b/src/main/java/org/schema/Fungus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Pathogenic fungus. */ @@ -25,7 +29,7 @@ public class Fungus { /** * Builder for {@link Fungus} */ - public static final class FungusThingBuilder implements Builder { + static final class FungusThingBuilder implements Builder { /** * Creates new {@link Fungus} instance. */ @@ -34,7 +38,7 @@ public Fungus build() { } } public interface Builder extends ThingBuilder { - + } protected Fungus() { diff --git a/src/main/java/org/schema/FurnitureStore.java b/src/main/java/org/schema/FurnitureStore.java index 48c32f63..50ba33b1 100644 --- a/src/main/java/org/schema/FurnitureStore.java +++ b/src/main/java/org/schema/FurnitureStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A furniture store. */ @@ -25,7 +29,7 @@ public class FurnitureStore extends Store { /** * Builder for {@link FurnitureStore} */ - public static final class FurnitureStoreThingBuilder implements Builder { + static final class FurnitureStoreThingBuilder implements Builder { /** * Creates new {@link FurnitureStore} instance. */ @@ -35,107 +39,107 @@ public FurnitureStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Game.java b/src/main/java/org/schema/Game.java index 3710b042..581529e8 100644 --- a/src/main/java/org/schema/Game.java +++ b/src/main/java/org/schema/Game.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The Game type represents things which are games. These are typically rule-governed recreational activities, e.g. role-playing games in which players assume the role of characters in a fictional setting. See also open issues list. */ @@ -55,7 +59,7 @@ public PlaceOrPostalAddressOrString getGameLocation() { /** * Builder for {@link Game} */ - public static final class GameThingBuilder implements Builder { + static final class GameThingBuilder implements Builder { /** * Creates new {@link Game} instance. */ @@ -65,59 +69,59 @@ public Game build() { /** * Indicate how many people can play this game (minimum, maximum, or range). */ - public Builder numberOfPlayers(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfPlayers(QuantitativeValue quantitativeValue) { this.numberOfPlayers = quantitativeValue; return this; } /** * Indicate how many people can play this game (minimum, maximum, or range). */ - public Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue) { return this.numberOfPlayers(quantitativeValue.build()); } /** * The task that a player-controlled character, or group of characters may complete in order to gain a reward. */ - public Builder quest(Thing thing) { + @NotNull public Builder quest(Thing thing) { this.quest = thing; return this; } /** * The task that a player-controlled character, or group of characters may complete in order to gain a reward. */ - public Builder quest(Thing.Builder thing) { + @NotNull public Builder quest(Thing.Builder thing) { return this.quest(thing.build()); } /** * An item is an object within the game world that can be collected by a player or, occasionally, a non-player character. */ - public Builder gameItem(Thing thing) { + @NotNull public Builder gameItem(Thing thing) { this.gameItem = thing; return this; } /** * An item is an object within the game world that can be collected by a player or, occasionally, a non-player character. */ - public Builder gameItem(Thing.Builder thing) { + @NotNull public Builder gameItem(Thing.Builder thing) { return this.gameItem(thing.build()); } /** * A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage). */ - public Builder characterAttribute(Thing thing) { + @NotNull public Builder characterAttribute(Thing thing) { this.characterAttribute = thing; return this; } /** * A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage). */ - public Builder characterAttribute(Thing.Builder thing) { + @NotNull public Builder characterAttribute(Thing.Builder thing) { return this.characterAttribute(thing.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(Place place) { + @NotNull public Builder gameLocation(Place place) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setPlace(place); return this; @@ -125,13 +129,13 @@ public Builder gameLocation(Place place) { /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(Place.Builder place) { + @NotNull public Builder gameLocation(Place.Builder place) { return this.gameLocation(place.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(PostalAddress postalAddress) { + @NotNull public Builder gameLocation(PostalAddress postalAddress) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setPostalAddress(postalAddress); return this; @@ -139,13 +143,13 @@ public Builder gameLocation(PostalAddress postalAddress) { /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(PostalAddress.Builder postalAddress) { + @NotNull public Builder gameLocation(PostalAddress.Builder postalAddress) { return this.gameLocation(postalAddress.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(String gameLocation) { + @NotNull public Builder gameLocation(String gameLocation) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setString(gameLocation); return this; @@ -153,127 +157,127 @@ public Builder gameLocation(String gameLocation) { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -295,20 +299,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -316,13 +320,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -330,40 +334,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -371,13 +375,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -385,13 +389,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -399,13 +403,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -413,21 +417,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -459,7 +463,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -467,13 +471,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -481,101 +485,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -583,13 +587,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -597,35 +601,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -633,13 +637,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -647,53 +651,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -701,13 +705,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -715,127 +719,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -843,7 +847,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -851,7 +855,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -859,7 +863,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -867,20 +871,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -888,13 +892,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -902,66 +906,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -969,13 +973,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -983,40 +987,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1050,7 +1054,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1085,7 +1089,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1118,7 +1122,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1126,38 +1130,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1225,7 +1229,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1243,157 +1247,157 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder numberOfPlayers(QuantitativeValue quantitativeValue); - Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue); - Builder quest(Thing thing); - Builder quest(Thing.Builder thing); - Builder gameItem(Thing thing); - Builder gameItem(Thing.Builder thing); - Builder characterAttribute(Thing thing); - Builder characterAttribute(Thing.Builder thing); - Builder gameLocation(Place place); - Builder gameLocation(Place.Builder place); - Builder gameLocation(PostalAddress postalAddress); - Builder gameLocation(PostalAddress.Builder postalAddress); - Builder gameLocation(String gameLocation); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder numberOfPlayers(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder quest(Thing thing); + @NotNull Builder quest(Thing.Builder thing); + @NotNull Builder gameItem(Thing thing); + @NotNull Builder gameItem(Thing.Builder thing); + @NotNull Builder characterAttribute(Thing thing); + @NotNull Builder characterAttribute(Thing.Builder thing); + @NotNull Builder gameLocation(Place place); + @NotNull Builder gameLocation(Place.Builder place); + @NotNull Builder gameLocation(PostalAddress postalAddress); + @NotNull Builder gameLocation(PostalAddress.Builder postalAddress); + @NotNull Builder gameLocation(String gameLocation); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Game(QuantitativeValue numberOfPlayers, Thing quest, Thing gameItem, Thing characterAttribute, PlaceOrPostalAddressOrString gameLocation, 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) { + protected Game(QuantitativeValue numberOfPlayers, Thing quest, Thing gameItem, Thing characterAttribute, PlaceOrPostalAddressOrString gameLocation, 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, int 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); myNumberOfPlayers = numberOfPlayers; myQuest = quest; diff --git a/src/main/java/org/schema/GamePlayMode.java b/src/main/java/org/schema/GamePlayMode.java index 0ac1c6ff..75c89ddb 100644 --- a/src/main/java/org/schema/GamePlayMode.java +++ b/src/main/java/org/schema/GamePlayMode.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates whether this game is multi-player, co-op or single-player. */ @@ -25,7 +29,7 @@ public class GamePlayMode extends Enumeration { /** * Builder for {@link GamePlayMode} */ - public static final class GamePlayModeThingBuilder implements Builder { + static final class GamePlayModeThingBuilder implements Builder { /** * Creates new {@link GamePlayMode} instance. */ @@ -35,7 +39,7 @@ public GamePlayMode build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected GamePlayMode(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/GameServer.java b/src/main/java/org/schema/GameServer.java index de1cab87..14d3e64f 100644 --- a/src/main/java/org/schema/GameServer.java +++ b/src/main/java/org/schema/GameServer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Server that provides game interaction in a multiplayer game. */ @@ -31,7 +35,7 @@ public GameServerStatus getServerStatus() { /** * Number of players on the server. */ - public Integer getPlayersOnline() { + public int getPlayersOnline() { return myPlayersOnline; } /** @@ -43,7 +47,7 @@ public VideoGame getGame() { /** * Builder for {@link GameServer} */ - public static final class GameServerThingBuilder implements Builder { + static final class GameServerThingBuilder implements Builder { /** * Creates new {@link GameServer} instance. */ @@ -53,54 +57,54 @@ public GameServer build() { /** * Status of a game server. */ - public Builder serverStatus(GameServerStatus gameServerStatus) { + @NotNull public Builder serverStatus(GameServerStatus gameServerStatus) { this.serverStatus = gameServerStatus; return this; } /** * Status of a game server. */ - public Builder serverStatus(GameServerStatus.Builder gameServerStatus) { + @NotNull public Builder serverStatus(GameServerStatus.Builder gameServerStatus) { return this.serverStatus(gameServerStatus.build()); } /** * Number of players on the server. */ - public Builder playersOnline(Integer integer) { - this.playersOnline = integer; + @NotNull public Builder playersOnline(int playersOnline) { + this.playersOnline = playersOnline; return this; } /** * Video game which is played on this server. */ - public Builder game(VideoGame videoGame) { + @NotNull public Builder game(VideoGame videoGame) { this.game = videoGame; return this; } /** * Video game which is played on this server. */ - public Builder game(VideoGame.Builder videoGame) { + @NotNull public Builder game(VideoGame.Builder videoGame) { return this.game(videoGame.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -134,7 +138,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -169,7 +173,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -202,7 +206,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -210,38 +214,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -249,7 +253,7 @@ public Builder id(long id) { return id(Long.toString(id)); } private GameServerStatus serverStatus; - private Integer playersOnline; + private int playersOnline; private VideoGame game; private String additionalType; private String alternateName; @@ -262,32 +266,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder serverStatus(GameServerStatus gameServerStatus); - Builder serverStatus(GameServerStatus.Builder gameServerStatus); - Builder playersOnline(Integer integer); - Builder game(VideoGame videoGame); - Builder game(VideoGame.Builder videoGame); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder serverStatus(GameServerStatus gameServerStatus); + @NotNull Builder serverStatus(GameServerStatus.Builder gameServerStatus); + @NotNull Builder playersOnline(int playersOnline); + @NotNull Builder game(VideoGame videoGame); + @NotNull Builder game(VideoGame.Builder videoGame); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected GameServer(GameServerStatus serverStatus, Integer playersOnline, VideoGame game, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected GameServer(GameServerStatus serverStatus, int playersOnline, VideoGame game, 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); myServerStatus = serverStatus; myPlayersOnline = playersOnline; myGame = game; } private GameServerStatus myServerStatus; - private Integer myPlayersOnline; + private int myPlayersOnline; private VideoGame myGame; } diff --git a/src/main/java/org/schema/GameServerStatus.java b/src/main/java/org/schema/GameServerStatus.java index 19ec616b..0b22a3bf 100644 --- a/src/main/java/org/schema/GameServerStatus.java +++ b/src/main/java/org/schema/GameServerStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Status of a game server. */ @@ -25,7 +29,7 @@ public class GameServerStatus extends Enumeration { /** * Builder for {@link GameServerStatus} */ - public static final class GameServerStatusThingBuilder implements Builder { + static final class GameServerStatusThingBuilder implements Builder { /** * Creates new {@link GameServerStatus} instance. */ @@ -35,7 +39,7 @@ public GameServerStatus build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected GameServerStatus(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/GardenStore.java b/src/main/java/org/schema/GardenStore.java index e616a026..81049dda 100644 --- a/src/main/java/org/schema/GardenStore.java +++ b/src/main/java/org/schema/GardenStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A garden store. */ @@ -25,7 +29,7 @@ public class GardenStore extends Store { /** * Builder for {@link GardenStore} */ - public static final class GardenStoreThingBuilder implements Builder { + static final class GardenStoreThingBuilder implements Builder { /** * Creates new {@link GardenStore} instance. */ @@ -35,107 +39,107 @@ public GardenStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/GasStation.java b/src/main/java/org/schema/GasStation.java index 562c2604..3dd3b80d 100644 --- a/src/main/java/org/schema/GasStation.java +++ b/src/main/java/org/schema/GasStation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A gas station. */ @@ -25,7 +29,7 @@ public class GasStation extends AutomotiveBusiness { /** * Builder for {@link GasStation} */ - public static final class GasStationThingBuilder implements Builder { + static final class GasStationThingBuilder implements Builder { /** * Creates new {@link GasStation} instance. */ @@ -35,107 +39,107 @@ public GasStation build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Gastroenterologic.java b/src/main/java/org/schema/Gastroenterologic.java index 2c0ff481..588e3f04 100644 --- a/src/main/java/org/schema/Gastroenterologic.java +++ b/src/main/java/org/schema/Gastroenterologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to diagnosis and treatment of disorders of digestive system. */ @@ -25,7 +29,7 @@ public class Gastroenterologic { /** * Builder for {@link Gastroenterologic} */ - public static final class GastroenterologicThingBuilder implements Builder { + static final class GastroenterologicThingBuilder implements Builder { /** * Creates new {@link Gastroenterologic} instance. */ @@ -34,7 +38,7 @@ public Gastroenterologic build() { } } public interface Builder extends ThingBuilder { - + } protected Gastroenterologic() { diff --git a/src/main/java/org/schema/GatedResidenceCommunity.java b/src/main/java/org/schema/GatedResidenceCommunity.java index ff5372d8..2868efd9 100644 --- a/src/main/java/org/schema/GatedResidenceCommunity.java +++ b/src/main/java/org/schema/GatedResidenceCommunity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Residence type: Gated community. */ @@ -25,7 +29,7 @@ public class GatedResidenceCommunity extends Residence { /** * Builder for {@link GatedResidenceCommunity} */ - public static final class GatedResidenceCommunityThingBuilder implements Builder { + static final class GatedResidenceCommunityThingBuilder implements Builder { /** * Creates new {@link GatedResidenceCommunity} instance. */ @@ -35,66 +39,66 @@ public GatedResidenceCommunity build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/GeneralContractor.java b/src/main/java/org/schema/GeneralContractor.java index 165ca1ee..8e648d00 100644 --- a/src/main/java/org/schema/GeneralContractor.java +++ b/src/main/java/org/schema/GeneralContractor.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A general contractor. */ @@ -25,7 +29,7 @@ public class GeneralContractor extends ProfessionalService { /** * Builder for {@link GeneralContractor} */ - public static final class GeneralContractorThingBuilder implements Builder { + static final class GeneralContractorThingBuilder implements Builder { /** * Creates new {@link GeneralContractor} instance. */ @@ -35,107 +39,107 @@ public GeneralContractor build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Genetic.java b/src/main/java/org/schema/Genetic.java index 62eeed4b..36f73f64 100644 --- a/src/main/java/org/schema/Genetic.java +++ b/src/main/java/org/schema/Genetic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to hereditary transmission and the variation of inherited characteristics and disorders. */ @@ -25,7 +29,7 @@ public class Genetic { /** * Builder for {@link Genetic} */ - public static final class GeneticThingBuilder implements Builder { + static final class GeneticThingBuilder implements Builder { /** * Creates new {@link Genetic} instance. */ @@ -34,7 +38,7 @@ public Genetic build() { } } public interface Builder extends ThingBuilder { - + } protected Genetic() { diff --git a/src/main/java/org/schema/Genitourinary.java b/src/main/java/org/schema/Genitourinary.java index 262a7be8..ff535528 100644 --- a/src/main/java/org/schema/Genitourinary.java +++ b/src/main/java/org/schema/Genitourinary.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Genitourinary. */ @@ -25,7 +29,7 @@ public class Genitourinary { /** * Builder for {@link Genitourinary} */ - public static final class GenitourinaryThingBuilder implements Builder { + static final class GenitourinaryThingBuilder implements Builder { /** * Creates new {@link Genitourinary} instance. */ @@ -34,7 +38,7 @@ public Genitourinary build() { } } public interface Builder extends ThingBuilder { - + } protected Genitourinary() { diff --git a/src/main/java/org/schema/GeoCoordinates.java b/src/main/java/org/schema/GeoCoordinates.java index 5b8cce2e..9084285e 100644 --- a/src/main/java/org/schema/GeoCoordinates.java +++ b/src/main/java/org/schema/GeoCoordinates.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The geographic coordinates of a place or event. */ @@ -43,7 +47,7 @@ public NumberOrString getLongitude() { /** * Builder for {@link GeoCoordinates} */ - public static final class GeoCoordinatesThingBuilder implements Builder { + static final class GeoCoordinatesThingBuilder implements Builder { /** * Creates new {@link GeoCoordinates} instance. */ @@ -53,7 +57,7 @@ public GeoCoordinates build() { /** * The elevation of a location. */ - public Builder elevation(Number number) { + @NotNull public Builder elevation(Number number) { if (this.elevation == null) this.elevation = new NumberOrString(); this.elevation.setNumber(number); return this; @@ -61,7 +65,7 @@ public Builder elevation(Number number) { /** * The elevation of a location. */ - public Builder elevation(String elevation) { + @NotNull public Builder elevation(String elevation) { if (this.elevation == null) this.elevation = new NumberOrString(); this.elevation.setString(elevation); return this; @@ -69,7 +73,7 @@ public Builder elevation(String elevation) { /** * The latitude of a location. For example 37.42242. */ - public Builder latitude(Number number) { + @NotNull public Builder latitude(Number number) { if (this.latitude == null) this.latitude = new NumberOrString(); this.latitude.setNumber(number); return this; @@ -77,7 +81,7 @@ public Builder latitude(Number number) { /** * The latitude of a location. For example 37.42242. */ - public Builder latitude(String latitude) { + @NotNull public Builder latitude(String latitude) { if (this.latitude == null) this.latitude = new NumberOrString(); this.latitude.setString(latitude); return this; @@ -85,7 +89,7 @@ public Builder latitude(String latitude) { /** * The longitude of a location. For example -122.08585. */ - public Builder longitude(Number number) { + @NotNull public Builder longitude(Number number) { if (this.longitude == null) this.longitude = new NumberOrString(); this.longitude.setNumber(number); return this; @@ -93,7 +97,7 @@ public Builder longitude(Number number) { /** * The longitude of a location. For example -122.08585. */ - public Builder longitude(String longitude) { + @NotNull public Builder longitude(String longitude) { if (this.longitude == null) this.longitude = new NumberOrString(); this.longitude.setString(longitude); return this; @@ -101,21 +105,21 @@ public Builder longitude(String longitude) { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -149,7 +153,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -184,7 +188,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -217,7 +221,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -225,38 +229,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -277,24 +281,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder elevation(Number number); - Builder elevation(String elevation); - Builder latitude(Number number); - Builder latitude(String latitude); - Builder longitude(Number number); - Builder longitude(String longitude); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder elevation(Number number); + @NotNull Builder elevation(String elevation); + @NotNull Builder latitude(Number number); + @NotNull Builder latitude(String latitude); + @NotNull Builder longitude(Number number); + @NotNull Builder longitude(String longitude); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/GeoCoordinatesOrGeoShape.java b/src/main/java/org/schema/GeoCoordinatesOrGeoShape.java index b0bf66f0..4862d4e6 100644 --- a/src/main/java/org/schema/GeoCoordinatesOrGeoShape.java +++ b/src/main/java/org/schema/GeoCoordinatesOrGeoShape.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class GeoCoordinatesOrGeoShape { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myGeoCoordinates != null) return myGeoCoordinates; if (myGeoShape != null) return myGeoShape; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setGeoCoordinates(GeoCoordinates geoCoordinates) { clear(); myGeoCoordinates = geoCoordinates; } public GeoCoordinates getGeoCoordinates() { return myGeoCoordinates; } - private GeoCoordinates myGeoCoordinates; public void setGeoShape(GeoShape geoShape) { clear(); myGeoShape = geoShape; } public GeoShape getGeoShape() { return myGeoShape; } + private GeoCoordinates myGeoCoordinates; private GeoShape myGeoShape; private void clear() { myGeoCoordinates = null; diff --git a/src/main/java/org/schema/GeoShape.java b/src/main/java/org/schema/GeoShape.java index 1b0d2807..a8be9bab 100644 --- a/src/main/java/org/schema/GeoShape.java +++ b/src/main/java/org/schema/GeoShape.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The geographic shape of a place. A GeoShape can be described using several properties whose values are based on latitude/longitude pairs. Either whitespace or commas can be used to separate latitude and longitude; whitespace should be used when writing a list of several such points. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews @@ -56,7 +60,7 @@ public String getPolygon() { /** * Builder for {@link GeoShape} */ - public static final class GeoShapeThingBuilder implements Builder { + static final class GeoShapeThingBuilder implements Builder { /** * Creates new {@link GeoShape} instance. */ @@ -66,21 +70,21 @@ public GeoShape build() { /** * A box is the area enclosed by the rectangle formed by two points. The first point is the lower corner, the second point is the upper corner. A box is expressed as two points separated by a space character. */ - public Builder box(String box) { + @NotNull public Builder box(String box) { this.box = box; return this; } /** * A circle is the circular region of a specified radius centered at a specified latitude and longitude. A circle is expressed as a pair followed by a radius in meters. */ - public Builder circle(String circle) { + @NotNull public Builder circle(String circle) { this.circle = circle; return this; } /** * The elevation of a location. */ - public Builder elevation(Number number) { + @NotNull public Builder elevation(Number number) { if (this.elevation == null) this.elevation = new NumberOrString(); this.elevation.setNumber(number); return this; @@ -88,7 +92,7 @@ public Builder elevation(Number number) { /** * The elevation of a location. */ - public Builder elevation(String elevation) { + @NotNull public Builder elevation(String elevation) { if (this.elevation == null) this.elevation = new NumberOrString(); this.elevation.setString(elevation); return this; @@ -96,35 +100,35 @@ public Builder elevation(String elevation) { /** * A line is a point-to-point path consisting of two or more points. A line is expressed as a series of two or more point objects separated by space. */ - public Builder line(String line) { + @NotNull public Builder line(String line) { this.line = line; return this; } /** * A polygon is the area enclosed by a point-to-point path for which the starting and ending points are the same. A polygon is expressed as a series of four or more space delimited points where the first and final points are identical. */ - public Builder polygon(String polygon) { + @NotNull public Builder polygon(String polygon) { this.polygon = polygon; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -158,7 +162,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -193,7 +197,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -226,7 +230,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -234,38 +238,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -288,24 +292,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder box(String box); - Builder circle(String circle); - Builder elevation(Number number); - Builder elevation(String elevation); - Builder line(String line); - Builder polygon(String polygon); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder box(String box); + @NotNull Builder circle(String circle); + @NotNull Builder elevation(Number number); + @NotNull Builder elevation(String elevation); + @NotNull Builder line(String line); + @NotNull Builder polygon(String polygon); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/GeoShapeOrPlaceOrString.java b/src/main/java/org/schema/GeoShapeOrPlaceOrString.java index 51c34916..4e387b16 100644 --- a/src/main/java/org/schema/GeoShapeOrPlaceOrString.java +++ b/src/main/java/org/schema/GeoShapeOrPlaceOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class GeoShapeOrPlaceOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myGeoShape != null) return myGeoShape; if (myPlace != null) return myPlace; @@ -29,12 +32,12 @@ public Object getJsonLdValue() { } public void setGeoShape(GeoShape geoShape) { clear(); myGeoShape = geoShape; } public GeoShape getGeoShape() { return myGeoShape; } - private GeoShape myGeoShape; public void setPlace(Place place) { clear(); myPlace = place; } public Place getPlace() { return myPlace; } - private Place myPlace; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private GeoShape myGeoShape; + private Place myPlace; private String myString; private void clear() { myGeoShape = null; diff --git a/src/main/java/org/schema/Geriatric.java b/src/main/java/org/schema/Geriatric.java index 140c8121..1b7fab85 100644 --- a/src/main/java/org/schema/Geriatric.java +++ b/src/main/java/org/schema/Geriatric.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that is concerned with the diagnosis and treatment of diseases, debilities and provision of care to the aged. */ @@ -25,7 +29,7 @@ public class Geriatric { /** * Builder for {@link Geriatric} */ - public static final class GeriatricThingBuilder implements Builder { + static final class GeriatricThingBuilder implements Builder { /** * Creates new {@link Geriatric} instance. */ @@ -34,7 +38,7 @@ public Geriatric build() { } } public interface Builder extends ThingBuilder { - + } protected Geriatric() { diff --git a/src/main/java/org/schema/GiveAction.java b/src/main/java/org/schema/GiveAction.java index f05a4f52..1c975e3a 100644 --- a/src/main/java/org/schema/GiveAction.java +++ b/src/main/java/org/schema/GiveAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of transferring ownership of an object to a destination. Reciprocal of TakeAction.

Related actions:

  • TakeAction: Reciprocal of GiveAction.
  • SendAction: Unlike SendAction, GiveAction implies that ownership is being transferred (e.g. I may send my laptop to you, but that doesn't mean I'm giving it to you)
. */ @@ -31,7 +35,7 @@ public AudienceOrOrganizationOrPerson getRecipient() { /** * Builder for {@link GiveAction} */ - public static final class GiveActionThingBuilder implements Builder { + static final class GiveActionThingBuilder implements Builder { /** * Creates new {@link GiveAction} instance. */ @@ -41,7 +45,7 @@ public GiveAction build() { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -49,13 +53,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -63,13 +67,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -77,39 +81,39 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -117,13 +121,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -131,7 +135,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -139,7 +143,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -148,67 +152,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -242,7 +246,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -277,7 +281,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -310,7 +314,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -318,38 +322,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -376,40 +380,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected GiveAction(AudienceOrOrganizationOrPerson recipient, 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) { diff --git a/src/main/java/org/schema/GolfCourse.java b/src/main/java/org/schema/GolfCourse.java index 5bb7b6c9..aa2cb1b8 100644 --- a/src/main/java/org/schema/GolfCourse.java +++ b/src/main/java/org/schema/GolfCourse.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A golf course. */ @@ -25,7 +29,7 @@ public class GolfCourse extends SportsActivityLocation { /** * Builder for {@link GolfCourse} */ - public static final class GolfCourseThingBuilder implements Builder { + static final class GolfCourseThingBuilder implements Builder { /** * Creates new {@link GolfCourse} instance. */ @@ -35,107 +39,107 @@ public GolfCourse build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/GoodRelationsClass.java b/src/main/java/org/schema/GoodRelationsClass.java index 68d75541..997fed73 100644 --- a/src/main/java/org/schema/GoodRelationsClass.java +++ b/src/main/java/org/schema/GoodRelationsClass.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This class is derived from the GoodRelations Vocabulary for E-Commerce, created by Martin Hepp. GoodRelations is a data model for sharing e-commerce data on the Web that can be expressed in a variety of syntaxes, including RDFa and HTML5 Microdata. More information about GoodRelations can be found at http://purl.org/goodrelations/. */ @@ -25,7 +29,7 @@ public class GoodRelationsClass { /** * Builder for {@link GoodRelationsClass} */ - public static final class GoodRelationsClassThingBuilder implements Builder { + static final class GoodRelationsClassThingBuilder implements Builder { /** * Creates new {@link GoodRelationsClass} instance. */ @@ -34,7 +38,7 @@ public GoodRelationsClass build() { } } public interface Builder extends ThingBuilder { - + } protected GoodRelationsClass() { diff --git a/src/main/java/org/schema/GoodRelationsProperties.java b/src/main/java/org/schema/GoodRelationsProperties.java index e9ff5aee..c12e0167 100644 --- a/src/main/java/org/schema/GoodRelationsProperties.java +++ b/src/main/java/org/schema/GoodRelationsProperties.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This class contains derivatives of properties from the GoodRelations Vocabulary for E-Commerce, created by Martin Hepp. GoodRelations is a data model for sharing e-commerce data on the Web that can be expressed in a variety of syntaxes, including RDFa and HTML5 Microdata. More information about GoodRelations can be found at http://purl.org/goodrelations/. */ @@ -25,7 +29,7 @@ public class GoodRelationsProperties { /** * Builder for {@link GoodRelationsProperties} */ - public static final class GoodRelationsPropertiesThingBuilder implements Builder { + static final class GoodRelationsPropertiesThingBuilder implements Builder { /** * Creates new {@link GoodRelationsProperties} instance. */ @@ -34,7 +38,7 @@ public GoodRelationsProperties build() { } } public interface Builder extends ThingBuilder { - + } protected GoodRelationsProperties() { diff --git a/src/main/java/org/schema/GovernmentBuilding.java b/src/main/java/org/schema/GovernmentBuilding.java index 9d77f46a..49c50fd5 100644 --- a/src/main/java/org/schema/GovernmentBuilding.java +++ b/src/main/java/org/schema/GovernmentBuilding.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A government building. */ @@ -25,7 +29,7 @@ public class GovernmentBuilding extends CivicStructure { /** * Builder for {@link GovernmentBuilding} */ - public static final class GovernmentBuildingThingBuilder implements Builder { + static final class GovernmentBuildingThingBuilder implements Builder { /** * Creates new {@link GovernmentBuilding} instance. */ @@ -35,73 +39,73 @@ public GovernmentBuilding build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/GovernmentOffice.java b/src/main/java/org/schema/GovernmentOffice.java index cbbf18b7..173ed566 100644 --- a/src/main/java/org/schema/GovernmentOffice.java +++ b/src/main/java/org/schema/GovernmentOffice.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A government office—for example, an IRS or DMV office. */ @@ -25,7 +29,7 @@ public class GovernmentOffice extends LocalBusiness { /** * Builder for {@link GovernmentOffice} */ - public static final class GovernmentOfficeThingBuilder implements Builder { + static final class GovernmentOfficeThingBuilder implements Builder { /** * Creates new {@link GovernmentOffice} instance. */ @@ -35,107 +39,107 @@ public GovernmentOffice build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/GovernmentOrganization.java b/src/main/java/org/schema/GovernmentOrganization.java index aeb7be5a..8a1aeb8e 100644 --- a/src/main/java/org/schema/GovernmentOrganization.java +++ b/src/main/java/org/schema/GovernmentOrganization.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A governmental organization or agency. */ @@ -25,7 +29,7 @@ public class GovernmentOrganization extends Organization { /** * Builder for {@link GovernmentOrganization} */ - public static final class GovernmentOrganizationThingBuilder implements Builder { + static final class GovernmentOrganizationThingBuilder implements Builder { /** * Creates new {@link GovernmentOrganization} instance. */ @@ -35,40 +39,40 @@ public GovernmentOrganization build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -76,13 +80,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -90,147 +94,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -238,13 +242,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -252,20 +256,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -287,13 +291,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -301,13 +305,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -315,33 +319,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -349,13 +353,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -363,100 +367,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -490,7 +494,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -525,7 +529,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -558,7 +562,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -566,38 +570,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -647,78 +651,78 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/GovernmentPermit.java b/src/main/java/org/schema/GovernmentPermit.java index b842ee61..ca3e82d8 100644 --- a/src/main/java/org/schema/GovernmentPermit.java +++ b/src/main/java/org/schema/GovernmentPermit.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A permit issued by a government agency. */ @@ -25,7 +29,7 @@ public class GovernmentPermit extends Permit { /** * Builder for {@link GovernmentPermit} */ - public static final class GovernmentPermitThingBuilder implements Builder { + static final class GovernmentPermitThingBuilder implements Builder { /** * Creates new {@link GovernmentPermit} instance. */ @@ -35,100 +39,100 @@ public GovernmentPermit build() { /** * The service through with the permit was granted. */ - public Builder issuedThrough(Service service) { + @NotNull public Builder issuedThrough(Service service) { this.issuedThrough = service; return this; } /** * The service through with the permit was granted. */ - public Builder issuedThrough(Service.Builder service) { + @NotNull public Builder issuedThrough(Service.Builder service) { return this.issuedThrough(service.build()); } /** * The target audience for this permit. */ - public Builder permitAudience(Audience audience) { + @NotNull public Builder permitAudience(Audience audience) { this.permitAudience = audience; return this; } /** * The target audience for this permit. */ - public Builder permitAudience(Audience.Builder audience) { + @NotNull public Builder permitAudience(Audience.Builder audience) { return this.permitAudience(audience.build()); } /** * The time validity of the permit. */ - public Builder validFor(Duration duration) { + @NotNull public Builder validFor(Duration duration) { this.validFor = duration; return this; } /** * The time validity of the permit. */ - public Builder validFor(Duration.Builder duration) { + @NotNull public Builder validFor(Duration.Builder duration) { return this.validFor(duration.build()); } /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The geographic area where the permit is valid. */ - public Builder validIn(AdministrativeArea administrativeArea) { + @NotNull public Builder validIn(AdministrativeArea administrativeArea) { this.validIn = administrativeArea; return this; } /** * The geographic area where the permit is valid. */ - public Builder validIn(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder validIn(AdministrativeArea.Builder administrativeArea) { return this.validIn(administrativeArea.build()); } /** * The date when the item is no longer valid. */ - public Builder validUntil(java.util.Date date) { + @NotNull public Builder validUntil(java.util.Date date) { this.validUntil = date; return this; } /** * The organization issuing the ticket or permit. */ - public Builder issuedBy(Organization organization) { + @NotNull public Builder issuedBy(Organization organization) { this.issuedBy = organization; return this; } /** * The organization issuing the ticket or permit. */ - public Builder issuedBy(Organization.Builder organization) { + @NotNull public Builder issuedBy(Organization.Builder organization) { return this.issuedBy(organization.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -162,7 +166,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -197,7 +201,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -230,7 +234,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -238,38 +242,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -294,30 +298,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder issuedThrough(Service service); - Builder issuedThrough(Service.Builder service); - Builder permitAudience(Audience audience); - Builder permitAudience(Audience.Builder audience); - Builder validFor(Duration duration); - Builder validFor(Duration.Builder duration); - Builder validFrom(java.util.Date date); - Builder validIn(AdministrativeArea administrativeArea); - Builder validIn(AdministrativeArea.Builder administrativeArea); - Builder validUntil(java.util.Date date); - Builder issuedBy(Organization organization); - Builder issuedBy(Organization.Builder organization); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder issuedThrough(Service service); + @NotNull Builder issuedThrough(Service.Builder service); + @NotNull Builder permitAudience(Audience audience); + @NotNull Builder permitAudience(Audience.Builder audience); + @NotNull Builder validFor(Duration duration); + @NotNull Builder validFor(Duration.Builder duration); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validIn(AdministrativeArea administrativeArea); + @NotNull Builder validIn(AdministrativeArea.Builder administrativeArea); + @NotNull Builder validUntil(java.util.Date date); + @NotNull Builder issuedBy(Organization organization); + @NotNull Builder issuedBy(Organization.Builder organization); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/GovernmentService.java b/src/main/java/org/schema/GovernmentService.java index 09e7adc3..a7d78d41 100644 --- a/src/main/java/org/schema/GovernmentService.java +++ b/src/main/java/org/schema/GovernmentService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A service provided by a government organization, e.g. food stamps, veterans benefits, etc. */ @@ -31,7 +35,7 @@ public Organization getServiceOperator() { /** * Builder for {@link GovernmentService} */ - public static final class GovernmentServiceThingBuilder implements Builder { + static final class GovernmentServiceThingBuilder implements Builder { /** * Creates new {@link GovernmentService} instance. */ @@ -41,92 +45,92 @@ public GovernmentService build() { /** * The operating organization, if different from the provider. This enables the representation of services that are provided by an organization, but operated by another organization like a subcontractor. */ - public Builder serviceOperator(Organization organization) { + @NotNull public Builder serviceOperator(Organization organization) { this.serviceOperator = organization; return this; } /** * The operating organization, if different from the provider. This enables the representation of services that are provided by an organization, but operated by another organization like a subcontractor. */ - public Builder serviceOperator(Organization.Builder organization) { + @NotNull public Builder serviceOperator(Organization.Builder organization) { return this.serviceOperator(organization.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel serviceChannel) { this.availableChannel = serviceChannel; return this; } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel.Builder serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel.Builder serviceChannel) { return this.availableChannel(serviceChannel.build()); } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing thing) { + @NotNull public Builder serviceOutput(Thing thing) { this.serviceOutput = thing; return this; } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing.Builder thing) { + @NotNull public Builder serviceOutput(Thing.Builder thing) { return this.serviceOutput(thing.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea administrativeArea) { this.serviceArea = administrativeArea; return this; } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { return this.serviceArea(administrativeArea.build()); } /** * The type of service being offered, e.g. veterans' benefits, emergency relief, etc. */ - public Builder serviceType(String serviceType) { + @NotNull public Builder serviceType(String serviceType) { this.serviceType = serviceType; return this; } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -134,13 +138,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -148,27 +152,27 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -202,7 +206,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -237,7 +241,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -270,7 +274,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -278,38 +282,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -335,35 +339,35 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder serviceOperator(Organization organization); - Builder serviceOperator(Organization.Builder organization); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder availableChannel(ServiceChannel serviceChannel); - Builder availableChannel(ServiceChannel.Builder serviceChannel); - Builder serviceOutput(Thing thing); - Builder serviceOutput(Thing.Builder thing); - Builder review(Review review); - Builder review(Review.Builder review); - Builder serviceArea(AdministrativeArea administrativeArea); - Builder serviceArea(AdministrativeArea.Builder administrativeArea); - Builder serviceType(String serviceType); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder serviceOperator(Organization organization); + @NotNull Builder serviceOperator(Organization.Builder organization); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder availableChannel(ServiceChannel serviceChannel); + @NotNull Builder availableChannel(ServiceChannel.Builder serviceChannel); + @NotNull Builder serviceOutput(Thing thing); + @NotNull Builder serviceOutput(Thing.Builder thing); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder serviceArea(AdministrativeArea administrativeArea); + @NotNull Builder serviceArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder serviceType(String serviceType); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected GovernmentService(Organization serviceOperator, 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) { diff --git a/src/main/java/org/schema/GroceryStore.java b/src/main/java/org/schema/GroceryStore.java index ec83b179..abb1a24b 100644 --- a/src/main/java/org/schema/GroceryStore.java +++ b/src/main/java/org/schema/GroceryStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A grocery store. */ @@ -25,7 +29,7 @@ public class GroceryStore extends Store { /** * Builder for {@link GroceryStore} */ - public static final class GroceryStoreThingBuilder implements Builder { + static final class GroceryStoreThingBuilder implements Builder { /** * Creates new {@link GroceryStore} instance. */ @@ -35,107 +39,107 @@ public GroceryStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/GroupBoardingPolicy.java b/src/main/java/org/schema/GroupBoardingPolicy.java index bab1a1db..438644bc 100644 --- a/src/main/java/org/schema/GroupBoardingPolicy.java +++ b/src/main/java/org/schema/GroupBoardingPolicy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The airline boards by groups based on check-in time, priority, etc. */ @@ -25,7 +29,7 @@ public class GroupBoardingPolicy { /** * Builder for {@link GroupBoardingPolicy} */ - public static final class GroupBoardingPolicyThingBuilder implements Builder { + static final class GroupBoardingPolicyThingBuilder implements Builder { /** * Creates new {@link GroupBoardingPolicy} instance. */ @@ -34,7 +38,7 @@ public GroupBoardingPolicy build() { } } public interface Builder extends ThingBuilder { - + } protected GroupBoardingPolicy() { diff --git a/src/main/java/org/schema/Gynecologic.java b/src/main/java/org/schema/Gynecologic.java index b80e34e3..44a90ea8 100644 --- a/src/main/java/org/schema/Gynecologic.java +++ b/src/main/java/org/schema/Gynecologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to the health care of women, particularly in the diagnosis and treatment of disorders affecting the female reproductive system. */ @@ -25,7 +29,7 @@ public class Gynecologic { /** * Builder for {@link Gynecologic} */ - public static final class GynecologicThingBuilder implements Builder { + static final class GynecologicThingBuilder implements Builder { /** * Creates new {@link Gynecologic} instance. */ @@ -34,7 +38,7 @@ public Gynecologic build() { } } public interface Builder extends ThingBuilder { - + } protected Gynecologic() { diff --git a/src/main/java/org/schema/HVACBusiness.java b/src/main/java/org/schema/HVACBusiness.java index 3fb04e8b..a8cd1fa6 100644 --- a/src/main/java/org/schema/HVACBusiness.java +++ b/src/main/java/org/schema/HVACBusiness.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A business that provide Heating, Ventilation and Air Conditioning services. */ @@ -25,7 +29,7 @@ public class HVACBusiness extends HomeAndConstructionBusiness { /** * Builder for {@link HVACBusiness} */ - public static final class HVACBusinessThingBuilder implements Builder { + static final class HVACBusinessThingBuilder implements Builder { /** * Creates new {@link HVACBusiness} instance. */ @@ -35,107 +39,107 @@ public HVACBusiness build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HairSalon.java b/src/main/java/org/schema/HairSalon.java index f9469fcc..3f8fc8f5 100644 --- a/src/main/java/org/schema/HairSalon.java +++ b/src/main/java/org/schema/HairSalon.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A hair salon. */ @@ -25,7 +29,7 @@ public class HairSalon extends HealthAndBeautyBusiness { /** * Builder for {@link HairSalon} */ - public static final class HairSalonThingBuilder implements Builder { + static final class HairSalonThingBuilder implements Builder { /** * Creates new {@link HairSalon} instance. */ @@ -35,107 +39,107 @@ public HairSalon build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Hardcover.java b/src/main/java/org/schema/Hardcover.java index ece7e852..c4d3ce57 100644 --- a/src/main/java/org/schema/Hardcover.java +++ b/src/main/java/org/schema/Hardcover.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Book format: Hardcover. */ @@ -25,7 +29,7 @@ public class Hardcover { /** * Builder for {@link Hardcover} */ - public static final class HardcoverThingBuilder implements Builder { + static final class HardcoverThingBuilder implements Builder { /** * Creates new {@link Hardcover} instance. */ @@ -34,7 +38,7 @@ public Hardcover build() { } } public interface Builder extends ThingBuilder { - + } protected Hardcover() { diff --git a/src/main/java/org/schema/HardwareStore.java b/src/main/java/org/schema/HardwareStore.java index dc221422..db9a3a97 100644 --- a/src/main/java/org/schema/HardwareStore.java +++ b/src/main/java/org/schema/HardwareStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A hardware store. */ @@ -25,7 +29,7 @@ public class HardwareStore extends Store { /** * Builder for {@link HardwareStore} */ - public static final class HardwareStoreThingBuilder implements Builder { + static final class HardwareStoreThingBuilder implements Builder { /** * Creates new {@link HardwareStore} instance. */ @@ -35,107 +39,107 @@ public HardwareStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HasPart.java b/src/main/java/org/schema/HasPart.java index 23a917ee..52b9818b 100644 --- a/src/main/java/org/schema/HasPart.java +++ b/src/main/java/org/schema/HasPart.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_bibex diff --git a/src/main/java/org/schema/Head.java b/src/main/java/org/schema/Head.java index 958497af..6177dc6b 100644 --- a/src/main/java/org/schema/Head.java +++ b/src/main/java/org/schema/Head.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Head. */ @@ -25,7 +29,7 @@ public class Head { /** * Builder for {@link Head} */ - public static final class HeadThingBuilder implements Builder { + static final class HeadThingBuilder implements Builder { /** * Creates new {@link Head} instance. */ @@ -34,7 +38,7 @@ public Head build() { } } public interface Builder extends ThingBuilder { - + } protected Head() { diff --git a/src/main/java/org/schema/HealthAndBeautyBusiness.java b/src/main/java/org/schema/HealthAndBeautyBusiness.java index 156ff6a6..b4950f17 100644 --- a/src/main/java/org/schema/HealthAndBeautyBusiness.java +++ b/src/main/java/org/schema/HealthAndBeautyBusiness.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Health and beauty. */ @@ -25,7 +29,7 @@ public class HealthAndBeautyBusiness extends LocalBusiness { /** * Builder for {@link HealthAndBeautyBusiness} */ - public static final class HealthAndBeautyBusinessThingBuilder implements Builder { + static final class HealthAndBeautyBusinessThingBuilder implements Builder { /** * Creates new {@link HealthAndBeautyBusiness} instance. */ @@ -35,107 +39,107 @@ public HealthAndBeautyBusiness build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HealthClub.java b/src/main/java/org/schema/HealthClub.java index f8d9c5e6..9dd061ec 100644 --- a/src/main/java/org/schema/HealthClub.java +++ b/src/main/java/org/schema/HealthClub.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A health club. */ @@ -25,7 +29,7 @@ public class HealthClub extends SportsActivityLocation { /** * Builder for {@link HealthClub} */ - public static final class HealthClubThingBuilder implements Builder { + static final class HealthClubThingBuilder implements Builder { /** * Creates new {@link HealthClub} instance. */ @@ -35,107 +39,107 @@ public HealthClub build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HearingImpairedSupported.java b/src/main/java/org/schema/HearingImpairedSupported.java index 02947561..b3fa4043 100644 --- a/src/main/java/org/schema/HearingImpairedSupported.java +++ b/src/main/java/org/schema/HearingImpairedSupported.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Uses devices to support users with hearing impairments. */ @@ -25,7 +29,7 @@ public class HearingImpairedSupported { /** * Builder for {@link HearingImpairedSupported} */ - public static final class HearingImpairedSupportedThingBuilder implements Builder { + static final class HearingImpairedSupportedThingBuilder implements Builder { /** * Creates new {@link HearingImpairedSupported} instance. */ @@ -34,7 +38,7 @@ public HearingImpairedSupported build() { } } public interface Builder extends ThingBuilder { - + } protected HearingImpairedSupported() { diff --git a/src/main/java/org/schema/Hematologic.java b/src/main/java/org/schema/Hematologic.java index 956771dd..a883714f 100644 --- a/src/main/java/org/schema/Hematologic.java +++ b/src/main/java/org/schema/Hematologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to diagnosis and treatment of disorders of blood and blood producing organs. */ @@ -25,7 +29,7 @@ public class Hematologic { /** * Builder for {@link Hematologic} */ - public static final class HematologicThingBuilder implements Builder { + static final class HematologicThingBuilder implements Builder { /** * Creates new {@link Hematologic} instance. */ @@ -34,7 +38,7 @@ public Hematologic build() { } } public interface Builder extends ThingBuilder { - + } protected Hematologic() { diff --git a/src/main/java/org/schema/HighSchool.java b/src/main/java/org/schema/HighSchool.java index e54a26ed..d710fed2 100644 --- a/src/main/java/org/schema/HighSchool.java +++ b/src/main/java/org/schema/HighSchool.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A high school. */ @@ -25,7 +29,7 @@ public class HighSchool extends EducationalOrganization { /** * Builder for {@link HighSchool} */ - public static final class HighSchoolThingBuilder implements Builder { + static final class HighSchoolThingBuilder implements Builder { /** * Creates new {@link HighSchool} instance. */ @@ -35,53 +39,53 @@ public HighSchool build() { /** * Alumni of educational organization. */ - public Builder alumni(Person person) { + @NotNull public Builder alumni(Person person) { this.alumni = person; return this; } /** * Alumni of educational organization. */ - public Builder alumni(Person.Builder person) { + @NotNull public Builder alumni(Person.Builder person) { return this.alumni(person.build()); } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -89,13 +93,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -103,147 +107,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -251,13 +255,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -265,20 +269,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -286,13 +290,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -300,13 +304,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -314,13 +318,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -328,33 +332,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -362,13 +366,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -376,100 +380,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -503,7 +507,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -538,7 +542,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -571,7 +575,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -579,38 +583,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -661,80 +665,80 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder alumni(Person person); - Builder alumni(Person.Builder person); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder alumni(Person person); + @NotNull Builder alumni(Person.Builder person); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HinduTemple.java b/src/main/java/org/schema/HinduTemple.java index f00529f0..4bb2fb72 100644 --- a/src/main/java/org/schema/HinduTemple.java +++ b/src/main/java/org/schema/HinduTemple.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A Hindu temple. */ @@ -25,7 +29,7 @@ public class HinduTemple extends PlaceOfWorship { /** * Builder for {@link HinduTemple} */ - public static final class HinduTempleThingBuilder implements Builder { + static final class HinduTempleThingBuilder implements Builder { /** * Creates new {@link HinduTemple} instance. */ @@ -35,73 +39,73 @@ public HinduTemple build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HobbyShop.java b/src/main/java/org/schema/HobbyShop.java index e9d72073..2b0b0e1c 100644 --- a/src/main/java/org/schema/HobbyShop.java +++ b/src/main/java/org/schema/HobbyShop.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A store that sells materials useful or necessary for various hobbies. */ @@ -25,7 +29,7 @@ public class HobbyShop extends Store { /** * Builder for {@link HobbyShop} */ - public static final class HobbyShopThingBuilder implements Builder { + static final class HobbyShopThingBuilder implements Builder { /** * Creates new {@link HobbyShop} instance. */ @@ -35,107 +39,107 @@ public HobbyShop build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HomeAndConstructionBusiness.java b/src/main/java/org/schema/HomeAndConstructionBusiness.java index 4251a7d1..c355b158 100644 --- a/src/main/java/org/schema/HomeAndConstructionBusiness.java +++ b/src/main/java/org/schema/HomeAndConstructionBusiness.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A construction business. */ @@ -25,7 +29,7 @@ public class HomeAndConstructionBusiness extends LocalBusiness { /** * Builder for {@link HomeAndConstructionBusiness} */ - public static final class HomeAndConstructionBusinessThingBuilder implements Builder { + static final class HomeAndConstructionBusinessThingBuilder implements Builder { /** * Creates new {@link HomeAndConstructionBusiness} instance. */ @@ -35,107 +39,107 @@ public HomeAndConstructionBusiness build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HomeGoodsStore.java b/src/main/java/org/schema/HomeGoodsStore.java index 59943dfc..7ef59a56 100644 --- a/src/main/java/org/schema/HomeGoodsStore.java +++ b/src/main/java/org/schema/HomeGoodsStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A home goods store. */ @@ -25,7 +29,7 @@ public class HomeGoodsStore extends Store { /** * Builder for {@link HomeGoodsStore} */ - public static final class HomeGoodsStoreThingBuilder implements Builder { + static final class HomeGoodsStoreThingBuilder implements Builder { /** * Creates new {@link HomeGoodsStore} instance. */ @@ -35,107 +39,107 @@ public HomeGoodsStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Homeopathic.java b/src/main/java/org/schema/Homeopathic.java index 39c1d380..e6ceaec5 100644 --- a/src/main/java/org/schema/Homeopathic.java +++ b/src/main/java/org/schema/Homeopathic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A system of medicine based on the principle that a disease can be cured by a substance that produces similar symptoms in healthy people. */ @@ -25,7 +29,7 @@ public class Homeopathic { /** * Builder for {@link Homeopathic} */ - public static final class HomeopathicThingBuilder implements Builder { + static final class HomeopathicThingBuilder implements Builder { /** * Creates new {@link Homeopathic} instance. */ @@ -34,7 +38,7 @@ public Homeopathic build() { } } public interface Builder extends ThingBuilder { - + } protected Homeopathic() { diff --git a/src/main/java/org/schema/Hospital.java b/src/main/java/org/schema/Hospital.java index 71074998..44d4b8b1 100644 --- a/src/main/java/org/schema/Hospital.java +++ b/src/main/java/org/schema/Hospital.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A hospital. */ @@ -37,7 +41,7 @@ public MedicalSpecialty getMedicalSpecialty() { /** * Builder for {@link Hospital} */ - public static final class HospitalThingBuilder implements Builder { + static final class HospitalThingBuilder implements Builder { /** * Creates new {@link Hospital} instance. */ @@ -47,7 +51,7 @@ public Hospital build() { /** * A medical service available from this provider. */ - public Builder availableService(MedicalProcedure medicalProcedure) { + @NotNull public Builder availableService(MedicalProcedure medicalProcedure) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalProcedure(medicalProcedure); return this; @@ -55,13 +59,13 @@ public Builder availableService(MedicalProcedure medicalProcedure) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalProcedure.Builder medicalProcedure) { + @NotNull public Builder availableService(MedicalProcedure.Builder medicalProcedure) { return this.availableService(medicalProcedure.build()); } /** * A medical service available from this provider. */ - public Builder availableService(MedicalTest medicalTest) { + @NotNull public Builder availableService(MedicalTest medicalTest) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalTest(medicalTest); return this; @@ -69,13 +73,13 @@ public Builder availableService(MedicalTest medicalTest) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalTest.Builder medicalTest) { + @NotNull public Builder availableService(MedicalTest.Builder medicalTest) { return this.availableService(medicalTest.build()); } /** * A medical service available from this provider. */ - public Builder availableService(MedicalTherapy medicalTherapy) { + @NotNull public Builder availableService(MedicalTherapy medicalTherapy) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalTherapy(medicalTherapy); return this; @@ -83,126 +87,126 @@ public Builder availableService(MedicalTherapy medicalTherapy) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder availableService(MedicalTherapy.Builder medicalTherapy) { return this.availableService(medicalTherapy.build()); } /** * A medical specialty of the provider. */ - public Builder medicalSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder medicalSpecialty(MedicalSpecialty medicalSpecialty) { this.medicalSpecialty = medicalSpecialty; return this; } /** * A medical specialty of the provider. */ - public Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.medicalSpecialty(medicalSpecialty.build()); } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -210,13 +214,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -224,27 +228,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -252,13 +256,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -266,7 +270,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -274,13 +278,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -288,20 +292,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -309,13 +313,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -323,26 +327,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -352,7 +356,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -362,27 +366,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -416,7 +420,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -451,7 +455,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -484,7 +488,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -492,38 +496,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -563,64 +567,64 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder availableService(MedicalProcedure medicalProcedure); - Builder availableService(MedicalProcedure.Builder medicalProcedure); - Builder availableService(MedicalTest medicalTest); - Builder availableService(MedicalTest.Builder medicalTest); - Builder availableService(MedicalTherapy medicalTherapy); - Builder availableService(MedicalTherapy.Builder medicalTherapy); - Builder medicalSpecialty(MedicalSpecialty medicalSpecialty); - Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder availableService(MedicalProcedure medicalProcedure); + @NotNull Builder availableService(MedicalProcedure.Builder medicalProcedure); + @NotNull Builder availableService(MedicalTest medicalTest); + @NotNull Builder availableService(MedicalTest.Builder medicalTest); + @NotNull Builder availableService(MedicalTherapy medicalTherapy); + @NotNull Builder availableService(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder medicalSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Hospital(MedicalProcedureOrMedicalTestOrMedicalTherapy availableService, MedicalSpecialty medicalSpecialty, 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) { diff --git a/src/main/java/org/schema/Hostel.java b/src/main/java/org/schema/Hostel.java index 0a072088..e54af943 100644 --- a/src/main/java/org/schema/Hostel.java +++ b/src/main/java/org/schema/Hostel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A hostel - cheap accommodation, often in shared dormitories. */ @@ -25,7 +29,7 @@ public class Hostel extends LodgingBusiness { /** * Builder for {@link Hostel} */ - public static final class HostelThingBuilder implements Builder { + static final class HostelThingBuilder implements Builder { /** * Creates new {@link Hostel} instance. */ @@ -35,107 +39,107 @@ public Hostel build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Hotel.java b/src/main/java/org/schema/Hotel.java index 4e8ae07a..a24a0698 100644 --- a/src/main/java/org/schema/Hotel.java +++ b/src/main/java/org/schema/Hotel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A hotel. */ @@ -25,7 +29,7 @@ public class Hotel extends LodgingBusiness { /** * Builder for {@link Hotel} */ - public static final class HotelThingBuilder implements Builder { + static final class HotelThingBuilder implements Builder { /** * Creates new {@link Hotel} instance. */ @@ -35,107 +39,107 @@ public Hotel build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/HousePainter.java b/src/main/java/org/schema/HousePainter.java index 9d439db5..ec00ae41 100644 --- a/src/main/java/org/schema/HousePainter.java +++ b/src/main/java/org/schema/HousePainter.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A house painting service. */ @@ -25,7 +29,7 @@ public class HousePainter extends ProfessionalService { /** * Builder for {@link HousePainter} */ - public static final class HousePainterThingBuilder implements Builder { + static final class HousePainterThingBuilder implements Builder { /** * Creates new {@link HousePainter} instance. */ @@ -35,107 +39,107 @@ public HousePainter build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/IceCreamShop.java b/src/main/java/org/schema/IceCreamShop.java index b0f7cad7..a0686037 100644 --- a/src/main/java/org/schema/IceCreamShop.java +++ b/src/main/java/org/schema/IceCreamShop.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An ice cream shop. */ @@ -25,7 +29,7 @@ public class IceCreamShop extends FoodEstablishment { /** * Builder for {@link IceCreamShop} */ - public static final class IceCreamShopThingBuilder implements Builder { + static final class IceCreamShopThingBuilder implements Builder { /** * Creates new {@link IceCreamShop} instance. */ @@ -35,7 +39,7 @@ public IceCreamShop build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -43,7 +47,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -51,121 +55,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -527,60 +531,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/IgnoreAction.java b/src/main/java/org/schema/IgnoreAction.java index d07c26fd..17a5474f 100644 --- a/src/main/java/org/schema/IgnoreAction.java +++ b/src/main/java/org/schema/IgnoreAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of intentionally disregarding the object. An agent ignores an object. */ @@ -25,7 +29,7 @@ public class IgnoreAction extends AssessAction { /** * Builder for {@link IgnoreAction} */ - public static final class IgnoreActionThingBuilder implements Builder { + static final class IgnoreActionThingBuilder implements Builder { /** * Creates new {@link IgnoreAction} instance. */ @@ -35,7 +39,7 @@ public IgnoreAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Image.java b/src/main/java/org/schema/Image.java index 7c24f465..868bfe0e 100644 --- a/src/main/java/org/schema/Image.java +++ b/src/main/java/org/schema/Image.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** */ public interface Image { diff --git a/src/main/java/org/schema/ImageGallery.java b/src/main/java/org/schema/ImageGallery.java index ae18d137..7d93525e 100644 --- a/src/main/java/org/schema/ImageGallery.java +++ b/src/main/java/org/schema/ImageGallery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web page type: Image gallery page. */ @@ -25,7 +29,7 @@ public class ImageGallery extends CollectionPage { /** * Builder for {@link ImageGallery} */ - public static final class ImageGalleryThingBuilder implements Builder { + static final class ImageGalleryThingBuilder implements Builder { /** * Creates new {@link ImageGallery} instance. */ @@ -35,7 +39,7 @@ public ImageGallery build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/ImageObject.java b/src/main/java/org/schema/ImageObject.java index b4f0d5b7..7714c5a7 100644 --- a/src/main/java/org/schema/ImageObject.java +++ b/src/main/java/org/schema/ImageObject.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An image file. * Equivalent class: http://purl.org/dc/dcmitype/Image @@ -50,7 +54,7 @@ public ImageObject getThumbnail() { /** * Builder for {@link ImageObject} */ - public static final class ImageObjectThingBuilder implements Builder { + static final class ImageObjectThingBuilder implements Builder { /** * Creates new {@link ImageObject} instance. */ @@ -60,14 +64,14 @@ public ImageObject build() { /** * The caption for this object. */ - public Builder caption(String caption) { + @NotNull public Builder caption(String caption) { this.caption = caption; return this; } /** * exif data for this object. */ - public Builder exifData(PropertyValue propertyValue) { + @NotNull public Builder exifData(PropertyValue propertyValue) { if (this.exifData == null) this.exifData = new PropertyValueOrString(); this.exifData.setPropertyValue(propertyValue); return this; @@ -75,13 +79,13 @@ public Builder exifData(PropertyValue propertyValue) { /** * exif data for this object. */ - public Builder exifData(PropertyValue.Builder propertyValue) { + @NotNull public Builder exifData(PropertyValue.Builder propertyValue) { return this.exifData(propertyValue.build()); } /** * exif data for this object. */ - public Builder exifData(String exifData) { + @NotNull public Builder exifData(String exifData) { if (this.exifData == null) this.exifData = new PropertyValueOrString(); this.exifData.setString(exifData); return this; @@ -89,108 +93,108 @@ public Builder exifData(String exifData) { /** * Indicates whether this image is representative of the content of the page. */ - public Builder representativeOfPage(Boolean representativeOfPage) { + @NotNull public Builder representativeOfPage(Boolean representativeOfPage) { this.representativeOfPage = representativeOfPage; return this; } /** * Thumbnail image for an image or video. */ - public Builder thumbnail(ImageObject imageObject) { + @NotNull public Builder thumbnail(ImageObject imageObject) { this.thumbnail = imageObject; return this; } /** * Thumbnail image for an image or video. */ - public Builder thumbnail(ImageObject.Builder imageObject) { + @NotNull public Builder thumbnail(ImageObject.Builder imageObject) { return this.thumbnail(imageObject.build()); } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle newsArticle) { this.associatedArticle = newsArticle; return this; } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle.Builder newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle.Builder newsArticle) { return this.associatedArticle(newsArticle.build()); } /** * The bitrate of the media object. */ - public Builder bitrate(String bitrate) { + @NotNull public Builder bitrate(String bitrate) { this.bitrate = bitrate; return this; } /** * File size in (mega/kilo) bytes. */ - public Builder contentSize(String contentSize) { + @NotNull public Builder contentSize(String contentSize) { this.contentSize = contentSize; return this; } /** * Actual bytes of the media object, for example the image file or video file. */ - public Builder contentUrl(String contentUrl) { + @NotNull public Builder contentUrl(String contentUrl) { this.contentUrl = contentUrl; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * A URL pointing to a player for a specific video. In general, this is the information in the src element of an embed tag and should not be the same as the content of the loc tag. */ - public Builder embedUrl(String embedUrl) { + @NotNull public Builder embedUrl(String embedUrl) { this.embedUrl = embedUrl; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork creativeWork) { this.encodesCreativeWork = creativeWork; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { return this.encodesCreativeWork(creativeWork.build()); } /** * mp3, mpeg4, etc. */ - public Builder encodingFormat(String encodingFormat) { + @NotNull public Builder encodingFormat(String encodingFormat) { this.encodingFormat = encodingFormat; return this; } /** * Date the content expires and is no longer useful or available. Useful for videos. */ - public Builder expires(java.util.Date date) { + @NotNull public Builder expires(java.util.Date date) { this.expires = date; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -198,13 +202,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -212,60 +216,60 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * Player type required—for example, Flash or Silverlight. */ - public Builder playerType(String playerType) { + @NotNull public Builder playerType(String playerType) { this.playerType = playerType; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place place) { + @NotNull public Builder regionsAllowed(Place place) { this.regionsAllowed = place; return this; } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place.Builder place) { + @NotNull public Builder regionsAllowed(Place.Builder place) { return this.regionsAllowed(place.build()); } /** * Indicates if use of the media require a subscription (either paid or free). Allowed values are true or false (note that an earlier version had 'yes', 'no'). */ - public Builder requiresSubscription(Boolean requiresSubscription) { + @NotNull public Builder requiresSubscription(Boolean requiresSubscription) { this.requiresSubscription = requiresSubscription; return this; } /** * Date when this media object was uploaded to this site. */ - public Builder uploadDate(java.util.Date date) { + @NotNull public Builder uploadDate(java.util.Date date) { this.uploadDate = date; return this; } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -273,13 +277,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -287,133 +291,133 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -421,13 +425,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -435,20 +439,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -456,13 +460,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -470,40 +474,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -511,13 +515,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -525,13 +529,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -539,13 +543,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -553,21 +557,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -575,7 +579,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -583,7 +587,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -591,7 +595,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -599,7 +603,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -607,13 +611,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -621,101 +625,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -723,13 +727,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -737,35 +741,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -773,13 +777,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -787,53 +791,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -841,13 +845,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -855,127 +859,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -983,7 +987,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -991,7 +995,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -999,7 +1003,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -1007,20 +1011,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -1028,13 +1032,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -1042,66 +1046,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1109,13 +1113,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1123,40 +1127,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1190,7 +1194,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1225,7 +1229,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1258,7 +1262,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1266,38 +1270,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1380,7 +1384,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1398,178 +1402,178 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder caption(String caption); - Builder exifData(PropertyValue propertyValue); - Builder exifData(PropertyValue.Builder propertyValue); - Builder exifData(String exifData); - Builder representativeOfPage(Boolean representativeOfPage); - Builder thumbnail(ImageObject imageObject); - Builder thumbnail(ImageObject.Builder imageObject); - Builder associatedArticle(NewsArticle newsArticle); - Builder associatedArticle(NewsArticle.Builder newsArticle); - Builder bitrate(String bitrate); - Builder contentSize(String contentSize); - Builder contentUrl(String contentUrl); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder embedUrl(String embedUrl); - Builder encodesCreativeWork(CreativeWork creativeWork); - Builder encodesCreativeWork(CreativeWork.Builder creativeWork); - Builder encodingFormat(String encodingFormat); - Builder expires(java.util.Date date); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder playerType(String playerType); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder regionsAllowed(Place place); - Builder regionsAllowed(Place.Builder place); - Builder requiresSubscription(Boolean requiresSubscription); - Builder uploadDate(java.util.Date date); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder caption(String caption); + @NotNull Builder exifData(PropertyValue propertyValue); + @NotNull Builder exifData(PropertyValue.Builder propertyValue); + @NotNull Builder exifData(String exifData); + @NotNull Builder representativeOfPage(Boolean representativeOfPage); + @NotNull Builder thumbnail(ImageObject imageObject); + @NotNull Builder thumbnail(ImageObject.Builder imageObject); + @NotNull Builder associatedArticle(NewsArticle newsArticle); + @NotNull Builder associatedArticle(NewsArticle.Builder newsArticle); + @NotNull Builder bitrate(String bitrate); + @NotNull Builder contentSize(String contentSize); + @NotNull Builder contentUrl(String contentUrl); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder embedUrl(String embedUrl); + @NotNull Builder encodesCreativeWork(CreativeWork creativeWork); + @NotNull Builder encodesCreativeWork(CreativeWork.Builder creativeWork); + @NotNull Builder encodingFormat(String encodingFormat); + @NotNull Builder expires(java.util.Date date); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder playerType(String playerType); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder regionsAllowed(Place place); + @NotNull Builder regionsAllowed(Place.Builder place); + @NotNull Builder requiresSubscription(Boolean requiresSubscription); + @NotNull Builder uploadDate(java.util.Date date); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected ImageObject(String caption, PropertyValueOrString exifData, Boolean representativeOfPage, ImageObject thumbnail, 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) { + protected ImageObject(String caption, PropertyValueOrString exifData, Boolean representativeOfPage, ImageObject thumbnail, 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, int 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); myCaption = caption; myExifData = exifData; diff --git a/src/main/java/org/schema/ImageObjectOrPhotograph.java b/src/main/java/org/schema/ImageObjectOrPhotograph.java index 8302cfa3..1b8cb17d 100644 --- a/src/main/java/org/schema/ImageObjectOrPhotograph.java +++ b/src/main/java/org/schema/ImageObjectOrPhotograph.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ImageObjectOrPhotograph { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myImageObject != null) return myImageObject; if (myPhotograph != null) return myPhotograph; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setImageObject(ImageObject imageObject) { clear(); myImageObject = imageObject; } public ImageObject getImageObject() { return myImageObject; } - private ImageObject myImageObject; public void setPhotograph(Photograph photograph) { clear(); myPhotograph = photograph; } public Photograph getPhotograph() { return myPhotograph; } + private ImageObject myImageObject; private Photograph myPhotograph; private void clear() { myImageObject = null; diff --git a/src/main/java/org/schema/ImageObjectOrString.java b/src/main/java/org/schema/ImageObjectOrString.java index 9fd66514..2db1ad76 100644 --- a/src/main/java/org/schema/ImageObjectOrString.java +++ b/src/main/java/org/schema/ImageObjectOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ImageObjectOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myImageObject != null) return myImageObject; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setImageObject(ImageObject imageObject) { clear(); myImageObject = imageObject; } public ImageObject getImageObject() { return myImageObject; } - private ImageObject myImageObject; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private ImageObject myImageObject; private String myString; private void clear() { myImageObject = null; diff --git a/src/main/java/org/schema/ImagingTest.java b/src/main/java/org/schema/ImagingTest.java index ccfbe293..8dd26cce 100644 --- a/src/main/java/org/schema/ImagingTest.java +++ b/src/main/java/org/schema/ImagingTest.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any medical imaging modality typically used for diagnostic purposes. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public MedicalImagingTechnique getImagingTechnique() { /** * Builder for {@link ImagingTest} */ - public static final class ImagingTestThingBuilder implements Builder { + static final class ImagingTestThingBuilder implements Builder { /** * Creates new {@link ImagingTest} instance. */ @@ -42,171 +46,171 @@ public ImagingTest build() { /** * Imaging technique used. */ - public Builder imagingTechnique(MedicalImagingTechnique medicalImagingTechnique) { + @NotNull public Builder imagingTechnique(MedicalImagingTechnique medicalImagingTechnique) { this.imagingTechnique = medicalImagingTechnique; return this; } /** * Imaging technique used. */ - public Builder imagingTechnique(MedicalImagingTechnique.Builder medicalImagingTechnique) { + @NotNull public Builder imagingTechnique(MedicalImagingTechnique.Builder medicalImagingTechnique) { return this.imagingTechnique(medicalImagingTechnique.build()); } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug drug) { + @NotNull public Builder affectedBy(Drug drug) { this.affectedBy = drug; return this; } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug.Builder drug) { + @NotNull public Builder affectedBy(Drug.Builder drug) { return this.affectedBy(drug.build()); } /** * Range of acceptable values for a typical patient, when applicable. */ - public Builder normalRange(String normalRange) { + @NotNull public Builder normalRange(String normalRange) { this.normalRange = normalRange; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign medicalSign) { + @NotNull public Builder signDetected(MedicalSign medicalSign) { this.signDetected = medicalSign; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign.Builder medicalSign) { + @NotNull public Builder signDetected(MedicalSign.Builder medicalSign) { return this.signDetected(medicalSign.build()); } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition medicalCondition) { this.usedToDiagnose = medicalCondition; return this; } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { return this.usedToDiagnose(medicalCondition.build()); } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice medicalDevice) { this.usesDevice = medicalDevice; return this; } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice.Builder medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice.Builder medicalDevice) { return this.usesDevice(medicalDevice.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -240,7 +244,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -275,7 +279,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -308,7 +312,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -316,38 +320,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -377,41 +381,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder imagingTechnique(MedicalImagingTechnique medicalImagingTechnique); - Builder imagingTechnique(MedicalImagingTechnique.Builder medicalImagingTechnique); - Builder affectedBy(Drug drug); - Builder affectedBy(Drug.Builder drug); - Builder normalRange(String normalRange); - Builder signDetected(MedicalSign medicalSign); - Builder signDetected(MedicalSign.Builder medicalSign); - Builder usedToDiagnose(MedicalCondition medicalCondition); - Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); - Builder usesDevice(MedicalDevice medicalDevice); - Builder usesDevice(MedicalDevice.Builder medicalDevice); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder imagingTechnique(MedicalImagingTechnique medicalImagingTechnique); + @NotNull Builder imagingTechnique(MedicalImagingTechnique.Builder medicalImagingTechnique); + @NotNull Builder affectedBy(Drug drug); + @NotNull Builder affectedBy(Drug.Builder drug); + @NotNull Builder normalRange(String normalRange); + @NotNull Builder signDetected(MedicalSign medicalSign); + @NotNull Builder signDetected(MedicalSign.Builder medicalSign); + @NotNull Builder usedToDiagnose(MedicalCondition medicalCondition); + @NotNull Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); + @NotNull Builder usesDevice(MedicalDevice medicalDevice); + @NotNull Builder usesDevice(MedicalDevice.Builder medicalDevice); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ImagingTest(MedicalImagingTechnique imagingTechnique, 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) { diff --git a/src/main/java/org/schema/InStock.java b/src/main/java/org/schema/InStock.java index e34bc6c3..29b168fb 100644 --- a/src/main/java/org/schema/InStock.java +++ b/src/main/java/org/schema/InStock.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is in stock. */ @@ -25,7 +29,7 @@ public class InStock { /** * Builder for {@link InStock} */ - public static final class InStockThingBuilder implements Builder { + static final class InStockThingBuilder implements Builder { /** * Creates new {@link InStock} instance. */ @@ -34,7 +38,7 @@ public InStock build() { } } public interface Builder extends ThingBuilder { - + } protected InStock() { diff --git a/src/main/java/org/schema/InStoreOnly.java b/src/main/java/org/schema/InStoreOnly.java index 834de634..eb37ec57 100644 --- a/src/main/java/org/schema/InStoreOnly.java +++ b/src/main/java/org/schema/InStoreOnly.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is available only at physical locations. */ @@ -25,7 +29,7 @@ public class InStoreOnly { /** * Builder for {@link InStoreOnly} */ - public static final class InStoreOnlyThingBuilder implements Builder { + static final class InStoreOnlyThingBuilder implements Builder { /** * Creates new {@link InStoreOnly} instance. */ @@ -34,7 +38,7 @@ public InStoreOnly build() { } } public interface Builder extends ThingBuilder { - + } protected InStoreOnly() { diff --git a/src/main/java/org/schema/IndividualProduct.java b/src/main/java/org/schema/IndividualProduct.java index 0e055d87..a64b421b 100644 --- a/src/main/java/org/schema/IndividualProduct.java +++ b/src/main/java/org/schema/IndividualProduct.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A single, identifiable product instance (e.g. a laptop with a particular serial number). * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -26,7 +30,7 @@ public class IndividualProduct extends Product { /** * Builder for {@link IndividualProduct} */ - public static final class IndividualProductThingBuilder implements Builder { + static final class IndividualProductThingBuilder implements Builder { /** * Creates new {@link IndividualProduct} instance. */ @@ -36,40 +40,40 @@ public IndividualProduct build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -77,13 +81,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -91,13 +95,13 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -105,13 +109,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -119,7 +123,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -127,20 +131,20 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The color of the product. */ - public Builder color(String color) { + @NotNull public Builder color(String color) { this.color = color; return this; } /** * The depth of the item. */ - public Builder depth(Distance distance) { + @NotNull public Builder depth(Distance distance) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setDistance(distance); return this; @@ -148,13 +152,13 @@ public Builder depth(Distance distance) { /** * The depth of the item. */ - public Builder depth(Distance.Builder distance) { + @NotNull public Builder depth(Distance.Builder distance) { return this.depth(distance.build()); } /** * The depth of the item. */ - public Builder depth(QuantitativeValue quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue quantitativeValue) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setQuantitativeValue(quantitativeValue); return this; @@ -162,41 +166,41 @@ public Builder depth(QuantitativeValue quantitativeValue) { /** * The depth of the item. */ - public Builder depth(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue.Builder quantitativeValue) { return this.depth(quantitativeValue.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -204,13 +208,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -218,78 +222,78 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product product) { this.isAccessoryOrSparePartFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product.Builder product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product.Builder product) { return this.isAccessoryOrSparePartFor(product.build()); } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product product) { + @NotNull public Builder isConsumableFor(Product product) { this.isConsumableFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product.Builder product) { + @NotNull public Builder isConsumableFor(Product.Builder product) { return this.isConsumableFor(product.build()); } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product product) { + @NotNull public Builder isRelatedTo(Product product) { this.isRelatedTo = product; return this; } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product.Builder product) { + @NotNull public Builder isRelatedTo(Product.Builder product) { return this.isRelatedTo(product.build()); } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product product) { + @NotNull public Builder isSimilarTo(Product product) { this.isSimilarTo = product; return this; } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product.Builder product) { + @NotNull public Builder isSimilarTo(Product.Builder product) { return this.isSimilarTo(product.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -297,13 +301,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -311,20 +315,20 @@ public Builder logo(String logo) { /** * The manufacturer of the product. */ - public Builder manufacturer(Organization organization) { + @NotNull public Builder manufacturer(Organization organization) { this.manufacturer = organization; return this; } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization.Builder organization) { + @NotNull public Builder manufacturer(Organization.Builder organization) { return this.manufacturer(organization.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel productModel) { + @NotNull public Builder model(ProductModel productModel) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setProductModel(productModel); return this; @@ -332,13 +336,13 @@ public Builder model(ProductModel productModel) { /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel.Builder productModel) { + @NotNull public Builder model(ProductModel.Builder productModel) { return this.model(productModel.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(String model) { + @NotNull public Builder model(String model) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setString(model); return this; @@ -346,74 +350,74 @@ public Builder model(String model) { /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The product identifier, such as ISBN. For example: <meta itemprop='productID' content='isbn:123-456-789'/>. */ - public Builder productID(String productID) { + @NotNull public Builder productID(String productID) { this.productID = productID; return this; } /** * The release date of a product or product model. This can be used to distinguish the exact variant of a product. */ - public Builder releaseDate(java.util.Date date) { + @NotNull public Builder releaseDate(java.util.Date date) { this.releaseDate = date; return this; } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue quantitativeValue) { this.weight = quantitativeValue; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue.Builder quantitativeValue) { return this.weight(quantitativeValue.build()); } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -421,13 +425,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -435,7 +439,7 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** @@ -444,7 +448,7 @@ public Builder width(QuantitativeValue.Builder quantitativeValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -454,41 +458,41 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * The date of production of the item, e.g. vehicle. */ - public Builder productionDate(java.util.Date date) { + @NotNull public Builder productionDate(java.util.Date date) { this.productionDate = date; return this; } /** * The date the item e.g. vehicle was purchased by the current owner. */ - public Builder purchaseDate(java.util.Date date) { + @NotNull public Builder purchaseDate(java.util.Date date) { this.purchaseDate = date; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -522,7 +526,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -557,7 +561,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -590,7 +594,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -598,38 +602,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -678,81 +682,81 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder color(String color); - Builder depth(Distance distance); - Builder depth(Distance.Builder distance); - Builder depth(QuantitativeValue quantitativeValue); - Builder depth(QuantitativeValue.Builder quantitativeValue); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder isAccessoryOrSparePartFor(Product product); - Builder isAccessoryOrSparePartFor(Product.Builder product); - Builder isConsumableFor(Product product); - Builder isConsumableFor(Product.Builder product); - Builder isRelatedTo(Product product); - Builder isRelatedTo(Product.Builder product); - Builder isSimilarTo(Product product); - Builder isSimilarTo(Product.Builder product); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder manufacturer(Organization organization); - Builder manufacturer(Organization.Builder organization); - Builder model(ProductModel productModel); - Builder model(ProductModel.Builder productModel); - Builder model(String model); - Builder mpn(String mpn); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder productID(String productID); - Builder releaseDate(java.util.Date date); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sku(String sku); - Builder weight(QuantitativeValue quantitativeValue); - Builder weight(QuantitativeValue.Builder quantitativeValue); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder productionDate(java.util.Date date); - Builder purchaseDate(java.util.Date date); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder color(String color); + @NotNull Builder depth(Distance distance); + @NotNull Builder depth(Distance.Builder distance); + @NotNull Builder depth(QuantitativeValue quantitativeValue); + @NotNull Builder depth(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder isAccessoryOrSparePartFor(Product product); + @NotNull Builder isAccessoryOrSparePartFor(Product.Builder product); + @NotNull Builder isConsumableFor(Product product); + @NotNull Builder isConsumableFor(Product.Builder product); + @NotNull Builder isRelatedTo(Product product); + @NotNull Builder isRelatedTo(Product.Builder product); + @NotNull Builder isSimilarTo(Product product); + @NotNull Builder isSimilarTo(Product.Builder product); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder manufacturer(Organization organization); + @NotNull Builder manufacturer(Organization.Builder organization); + @NotNull Builder model(ProductModel productModel); + @NotNull Builder model(ProductModel.Builder productModel); + @NotNull Builder model(String model); + @NotNull Builder mpn(String mpn); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder productID(String productID); + @NotNull Builder releaseDate(java.util.Date date); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sku(String sku); + @NotNull Builder weight(QuantitativeValue quantitativeValue); + @NotNull Builder weight(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder productionDate(java.util.Date date); + @NotNull Builder purchaseDate(java.util.Date date); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Infectious.java b/src/main/java/org/schema/Infectious.java index f3369add..658a5080 100644 --- a/src/main/java/org/schema/Infectious.java +++ b/src/main/java/org/schema/Infectious.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to diagnosis and treatment of bacterial, viral, fungal and parasitic infections. */ @@ -25,7 +29,7 @@ public class Infectious { /** * Builder for {@link Infectious} */ - public static final class InfectiousThingBuilder implements Builder { + static final class InfectiousThingBuilder implements Builder { /** * Creates new {@link Infectious} instance. */ @@ -34,7 +38,7 @@ public Infectious build() { } } public interface Builder extends ThingBuilder { - + } protected Infectious() { diff --git a/src/main/java/org/schema/InfectiousAgentClass.java b/src/main/java/org/schema/InfectiousAgentClass.java index 0158c54d..3c345f04 100644 --- a/src/main/java/org/schema/InfectiousAgentClass.java +++ b/src/main/java/org/schema/InfectiousAgentClass.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Classes of agents or pathogens that transmit infectious diseases. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class InfectiousAgentClass extends Enumeration { /** * Builder for {@link InfectiousAgentClass} */ - public static final class InfectiousAgentClassThingBuilder implements Builder { + static final class InfectiousAgentClassThingBuilder implements Builder { /** * Creates new {@link InfectiousAgentClass} instance. */ @@ -36,7 +40,7 @@ public InfectiousAgentClass build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected InfectiousAgentClass(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/InfectiousDisease.java b/src/main/java/org/schema/InfectiousDisease.java index a6a95743..ee8df79b 100644 --- a/src/main/java/org/schema/InfectiousDisease.java +++ b/src/main/java/org/schema/InfectiousDisease.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An infectious disease is a clinically evident human disease resulting from the presence of pathogenic microbial agents, like pathogenic viruses, pathogenic bacteria, fungi, protozoa, multicellular parasites, and prions. To be considered an infectious disease, such pathogens are known to be able to cause this disease. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -44,7 +48,7 @@ public String getTransmissionMethod() { /** * Builder for {@link InfectiousDisease} */ - public static final class InfectiousDiseaseThingBuilder implements Builder { + static final class InfectiousDiseaseThingBuilder implements Builder { /** * Creates new {@link InfectiousDisease} instance. */ @@ -54,34 +58,34 @@ public InfectiousDisease build() { /** * The actual infectious agent, such as a specific bacterium. */ - public Builder infectiousAgent(String infectiousAgent) { + @NotNull public Builder infectiousAgent(String infectiousAgent) { this.infectiousAgent = infectiousAgent; return this; } /** * The class of infectious agent (bacteria, prion, etc.) that causes the disease. */ - public Builder infectiousAgentClass(InfectiousAgentClass infectiousAgentClass) { + @NotNull public Builder infectiousAgentClass(InfectiousAgentClass infectiousAgentClass) { this.infectiousAgentClass = infectiousAgentClass; return this; } /** * The class of infectious agent (bacteria, prion, etc.) that causes the disease. */ - public Builder infectiousAgentClass(InfectiousAgentClass.Builder infectiousAgentClass) { + @NotNull public Builder infectiousAgentClass(InfectiousAgentClass.Builder infectiousAgentClass) { return this.infectiousAgentClass(infectiousAgentClass.build()); } /** * How the disease spreads, either as a route or vector, for example 'direct contact', 'Aedes aegypti', etc. */ - public Builder transmissionMethod(String transmissionMethod) { + @NotNull public Builder transmissionMethod(String transmissionMethod) { this.transmissionMethod = transmissionMethod; return this; } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setAnatomicalStructure(anatomicalStructure); return this; @@ -89,13 +93,13 @@ public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { return this.associatedAnatomy(anatomicalStructure.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { + @NotNull public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setAnatomicalSystem(anatomicalSystem); return this; @@ -103,13 +107,13 @@ public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { + @NotNull public Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { return this.associatedAnatomy(anatomicalSystem.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { + @NotNull public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setSuperficialAnatomy(superficialAnatomy); return this; @@ -117,264 +121,264 @@ public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy) { + @NotNull public Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy) { return this.associatedAnatomy(superficialAnatomy.build()); } /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause medicalCause) { + @NotNull public Builder cause(MedicalCause medicalCause) { this.cause = medicalCause; return this; } /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause.Builder medicalCause) { + @NotNull public Builder cause(MedicalCause.Builder medicalCause) { return this.cause(medicalCause.build()); } /** * One of a set of differential diagnoses for the condition. Specifically, a closely-related or competing diagnosis typically considered later in the cognitive process whereby this medical condition is distinguished from others most likely responsible for a similar collection of signs and symptoms to reach the most parsimonious diagnosis or diagnoses in a patient. */ - public Builder differentialDiagnosis(DDxElement dDxElement) { + @NotNull public Builder differentialDiagnosis(DDxElement dDxElement) { this.differentialDiagnosis = dDxElement; return this; } /** * One of a set of differential diagnoses for the condition. Specifically, a closely-related or competing diagnosis typically considered later in the cognitive process whereby this medical condition is distinguished from others most likely responsible for a similar collection of signs and symptoms to reach the most parsimonious diagnosis or diagnoses in a patient. */ - public Builder differentialDiagnosis(DDxElement.Builder dDxElement) { + @NotNull public Builder differentialDiagnosis(DDxElement.Builder dDxElement) { return this.differentialDiagnosis(dDxElement.build()); } /** * The characteristics of associated patients, such as age, gender, race etc. */ - public Builder epidemiology(String epidemiology) { + @NotNull public Builder epidemiology(String epidemiology) { this.epidemiology = epidemiology; return this; } /** * The likely outcome in either the short term or long term of the medical condition. */ - public Builder expectedPrognosis(String expectedPrognosis) { + @NotNull public Builder expectedPrognosis(String expectedPrognosis) { this.expectedPrognosis = expectedPrognosis; return this; } /** * The expected progression of the condition if it is not treated and allowed to progress naturally. */ - public Builder naturalProgression(String naturalProgression) { + @NotNull public Builder naturalProgression(String naturalProgression) { this.naturalProgression = naturalProgression; return this; } /** * Changes in the normal mechanical, physical, and biochemical functions that are associated with this activity or condition. */ - public Builder pathophysiology(String pathophysiology) { + @NotNull public Builder pathophysiology(String pathophysiology) { this.pathophysiology = pathophysiology; return this; } /** * A possible unexpected and unfavorable evolution of a medical condition. Complications may include worsening of the signs or symptoms of the disease, extension of the condition to other organ systems, etc. */ - public Builder possibleComplication(String possibleComplication) { + @NotNull public Builder possibleComplication(String possibleComplication) { this.possibleComplication = possibleComplication; return this; } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy medicalTherapy) { this.possibleTreatment = medicalTherapy; return this; } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { return this.possibleTreatment(medicalTherapy.build()); } /** * A preventative therapy used to prevent an initial occurrence of the medical condition, such as vaccination. */ - public Builder primaryPrevention(MedicalTherapy medicalTherapy) { + @NotNull public Builder primaryPrevention(MedicalTherapy medicalTherapy) { this.primaryPrevention = medicalTherapy; return this; } /** * A preventative therapy used to prevent an initial occurrence of the medical condition, such as vaccination. */ - public Builder primaryPrevention(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder primaryPrevention(MedicalTherapy.Builder medicalTherapy) { return this.primaryPrevention(medicalTherapy.build()); } /** * A modifiable or non-modifiable factor that increases the risk of a patient contracting this condition, e.g. age, coexisting condition. */ - public Builder riskFactor(MedicalRiskFactor medicalRiskFactor) { + @NotNull public Builder riskFactor(MedicalRiskFactor medicalRiskFactor) { this.riskFactor = medicalRiskFactor; return this; } /** * A modifiable or non-modifiable factor that increases the risk of a patient contracting this condition, e.g. age, coexisting condition. */ - public Builder riskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { + @NotNull public Builder riskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { return this.riskFactor(medicalRiskFactor.build()); } /** * A preventative therapy used to prevent reoccurrence of the medical condition after an initial episode of the condition. */ - public Builder secondaryPrevention(MedicalTherapy medicalTherapy) { + @NotNull public Builder secondaryPrevention(MedicalTherapy medicalTherapy) { this.secondaryPrevention = medicalTherapy; return this; } /** * A preventative therapy used to prevent reoccurrence of the medical condition after an initial episode of the condition. */ - public Builder secondaryPrevention(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder secondaryPrevention(MedicalTherapy.Builder medicalTherapy) { return this.secondaryPrevention(medicalTherapy.build()); } /** * A sign or symptom of this condition. Signs are objective or physically observable manifestations of the medical condition while symptoms are the subjective experience of the medical condition. */ - public Builder signOrSymptom(MedicalSignOrSymptom medicalSignOrSymptom) { + @NotNull public Builder signOrSymptom(MedicalSignOrSymptom medicalSignOrSymptom) { this.signOrSymptom = medicalSignOrSymptom; return this; } /** * A sign or symptom of this condition. Signs are objective or physically observable manifestations of the medical condition while symptoms are the subjective experience of the medical condition. */ - public Builder signOrSymptom(MedicalSignOrSymptom.Builder medicalSignOrSymptom) { + @NotNull public Builder signOrSymptom(MedicalSignOrSymptom.Builder medicalSignOrSymptom) { return this.signOrSymptom(medicalSignOrSymptom.build()); } /** * The stage of the condition, if applicable. */ - public Builder stage(MedicalConditionStage medicalConditionStage) { + @NotNull public Builder stage(MedicalConditionStage medicalConditionStage) { this.stage = medicalConditionStage; return this; } /** * The stage of the condition, if applicable. */ - public Builder stage(MedicalConditionStage.Builder medicalConditionStage) { + @NotNull public Builder stage(MedicalConditionStage.Builder medicalConditionStage) { return this.stage(medicalConditionStage.build()); } /** * A more specific type of the condition, where applicable, for example 'Type 1 Diabetes', 'Type 2 Diabetes', or 'Gestational Diabetes' for Diabetes. */ - public Builder subtype(String subtype) { + @NotNull public Builder subtype(String subtype) { this.subtype = subtype; return this; } /** * A medical test typically performed given this condition. */ - public Builder typicalTest(MedicalTest medicalTest) { + @NotNull public Builder typicalTest(MedicalTest medicalTest) { this.typicalTest = medicalTest; return this; } /** * A medical test typically performed given this condition. */ - public Builder typicalTest(MedicalTest.Builder medicalTest) { + @NotNull public Builder typicalTest(MedicalTest.Builder medicalTest) { return this.typicalTest(medicalTest.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -408,7 +412,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -443,7 +447,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -476,7 +480,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -484,38 +488,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -558,64 +562,64 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder infectiousAgent(String infectiousAgent); - Builder infectiousAgentClass(InfectiousAgentClass infectiousAgentClass); - Builder infectiousAgentClass(InfectiousAgentClass.Builder infectiousAgentClass); - Builder transmissionMethod(String transmissionMethod); - Builder associatedAnatomy(AnatomicalStructure anatomicalStructure); - Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); - Builder associatedAnatomy(AnatomicalSystem anatomicalSystem); - Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); - Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy); - Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy); - Builder cause(MedicalCause medicalCause); - Builder cause(MedicalCause.Builder medicalCause); - Builder differentialDiagnosis(DDxElement dDxElement); - Builder differentialDiagnosis(DDxElement.Builder dDxElement); - Builder epidemiology(String epidemiology); - Builder expectedPrognosis(String expectedPrognosis); - Builder naturalProgression(String naturalProgression); - Builder pathophysiology(String pathophysiology); - Builder possibleComplication(String possibleComplication); - Builder possibleTreatment(MedicalTherapy medicalTherapy); - Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); - Builder primaryPrevention(MedicalTherapy medicalTherapy); - Builder primaryPrevention(MedicalTherapy.Builder medicalTherapy); - Builder riskFactor(MedicalRiskFactor medicalRiskFactor); - Builder riskFactor(MedicalRiskFactor.Builder medicalRiskFactor); - Builder secondaryPrevention(MedicalTherapy medicalTherapy); - Builder secondaryPrevention(MedicalTherapy.Builder medicalTherapy); - Builder signOrSymptom(MedicalSignOrSymptom medicalSignOrSymptom); - Builder signOrSymptom(MedicalSignOrSymptom.Builder medicalSignOrSymptom); - Builder stage(MedicalConditionStage medicalConditionStage); - Builder stage(MedicalConditionStage.Builder medicalConditionStage); - Builder subtype(String subtype); - Builder typicalTest(MedicalTest medicalTest); - Builder typicalTest(MedicalTest.Builder medicalTest); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder infectiousAgent(String infectiousAgent); + @NotNull Builder infectiousAgentClass(InfectiousAgentClass infectiousAgentClass); + @NotNull Builder infectiousAgentClass(InfectiousAgentClass.Builder infectiousAgentClass); + @NotNull Builder transmissionMethod(String transmissionMethod); + @NotNull Builder associatedAnatomy(AnatomicalStructure anatomicalStructure); + @NotNull Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder associatedAnatomy(AnatomicalSystem anatomicalSystem); + @NotNull Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); + @NotNull Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy); + @NotNull Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy); + @NotNull Builder cause(MedicalCause medicalCause); + @NotNull Builder cause(MedicalCause.Builder medicalCause); + @NotNull Builder differentialDiagnosis(DDxElement dDxElement); + @NotNull Builder differentialDiagnosis(DDxElement.Builder dDxElement); + @NotNull Builder epidemiology(String epidemiology); + @NotNull Builder expectedPrognosis(String expectedPrognosis); + @NotNull Builder naturalProgression(String naturalProgression); + @NotNull Builder pathophysiology(String pathophysiology); + @NotNull Builder possibleComplication(String possibleComplication); + @NotNull Builder possibleTreatment(MedicalTherapy medicalTherapy); + @NotNull Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder primaryPrevention(MedicalTherapy medicalTherapy); + @NotNull Builder primaryPrevention(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder riskFactor(MedicalRiskFactor medicalRiskFactor); + @NotNull Builder riskFactor(MedicalRiskFactor.Builder medicalRiskFactor); + @NotNull Builder secondaryPrevention(MedicalTherapy medicalTherapy); + @NotNull Builder secondaryPrevention(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder signOrSymptom(MedicalSignOrSymptom medicalSignOrSymptom); + @NotNull Builder signOrSymptom(MedicalSignOrSymptom.Builder medicalSignOrSymptom); + @NotNull Builder stage(MedicalConditionStage medicalConditionStage); + @NotNull Builder stage(MedicalConditionStage.Builder medicalConditionStage); + @NotNull Builder subtype(String subtype); + @NotNull Builder typicalTest(MedicalTest medicalTest); + @NotNull Builder typicalTest(MedicalTest.Builder medicalTest); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected InfectiousDisease(String infectiousAgent, InfectiousAgentClass infectiousAgentClass, String transmissionMethod, AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy associatedAnatomy, MedicalCause cause, DDxElement differentialDiagnosis, String epidemiology, String expectedPrognosis, String naturalProgression, String pathophysiology, String possibleComplication, MedicalTherapy possibleTreatment, MedicalTherapy primaryPrevention, MedicalRiskFactor riskFactor, MedicalTherapy secondaryPrevention, MedicalSignOrSymptom signOrSymptom, MedicalConditionStage stage, String subtype, MedicalTest typicalTest, 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) { diff --git a/src/main/java/org/schema/InformAction.java b/src/main/java/org/schema/InformAction.java index cca3483d..13d53ebb 100644 --- a/src/main/java/org/schema/InformAction.java +++ b/src/main/java/org/schema/InformAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of notifying someone of information pertinent to them, with no expectation of a response. */ @@ -31,7 +35,7 @@ public Event getEvent() { /** * Builder for {@link InformAction} */ - public static final class InformActionThingBuilder implements Builder { + static final class InformActionThingBuilder implements Builder { /** * Creates new {@link InformAction} instance. */ @@ -41,33 +45,33 @@ public InformAction build() { /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -75,13 +79,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -89,7 +93,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -97,13 +101,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -111,13 +115,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -125,13 +129,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -139,13 +143,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -153,7 +157,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -161,7 +165,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -170,67 +174,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -264,7 +268,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -299,7 +303,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -332,7 +336,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -340,38 +344,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -399,43 +403,43 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder event(Event event); - Builder event(Event.Builder event); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected InformAction(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) { diff --git a/src/main/java/org/schema/InsertAction.java b/src/main/java/org/schema/InsertAction.java index 0f74474c..f92ae7fd 100644 --- a/src/main/java/org/schema/InsertAction.java +++ b/src/main/java/org/schema/InsertAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of adding at a specific location in an ordered collection. */ @@ -31,7 +35,7 @@ public Place getToLocation() { /** * Builder for {@link InsertAction} */ - public static final class InsertActionThingBuilder implements Builder { + static final class InsertActionThingBuilder implements Builder { /** * Creates new {@link InsertAction} instance. */ @@ -41,33 +45,33 @@ public InsertAction build() { /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing thing) { + @NotNull public Builder targetCollection(Thing thing) { this.targetCollection = thing; return this; } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing.Builder thing) { + @NotNull public Builder targetCollection(Thing.Builder thing) { return this.targetCollection(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -75,13 +79,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -89,7 +93,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -97,7 +101,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -106,67 +110,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -200,7 +204,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -235,7 +239,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -268,7 +272,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -276,38 +280,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -333,34 +337,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder targetCollection(Thing thing); - Builder targetCollection(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder targetCollection(Thing thing); + @NotNull Builder targetCollection(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected InsertAction(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) { diff --git a/src/main/java/org/schema/InstallAction.java b/src/main/java/org/schema/InstallAction.java index 3f85f96e..675f77b5 100644 --- a/src/main/java/org/schema/InstallAction.java +++ b/src/main/java/org/schema/InstallAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of installing an application. */ @@ -25,7 +29,7 @@ public class InstallAction extends ConsumeAction { /** * Builder for {@link InstallAction} */ - public static final class InstallActionThingBuilder implements Builder { + static final class InstallActionThingBuilder implements Builder { /** * Creates new {@link InstallAction} instance. */ @@ -35,20 +39,20 @@ public InstallAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Instrument.java b/src/main/java/org/schema/Instrument.java index cd10cd5d..7eeef718 100644 --- a/src/main/java/org/schema/Instrument.java +++ b/src/main/java/org/schema/Instrument.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** */ public interface Instrument { diff --git a/src/main/java/org/schema/InsuranceAgency.java b/src/main/java/org/schema/InsuranceAgency.java index f13900c8..d54374e6 100644 --- a/src/main/java/org/schema/InsuranceAgency.java +++ b/src/main/java/org/schema/InsuranceAgency.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An Insurance agency. */ @@ -25,7 +29,7 @@ public class InsuranceAgency extends FinancialService { /** * Builder for {@link InsuranceAgency} */ - public static final class InsuranceAgencyThingBuilder implements Builder { + static final class InsuranceAgencyThingBuilder implements Builder { /** * Creates new {@link InsuranceAgency} instance. */ @@ -35,107 +39,107 @@ public InsuranceAgency build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Intangible.java b/src/main/java/org/schema/Intangible.java index 78c9022d..9201b072 100644 --- a/src/main/java/org/schema/Intangible.java +++ b/src/main/java/org/schema/Intangible.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A utility class that serves as the umbrella for a number of 'intangible' things such as quantities, structured values, etc. */ @@ -25,7 +29,7 @@ public class Intangible extends Thing { /** * Builder for {@link Intangible} */ - public static final class IntangibleThingBuilder implements Builder { + static final class IntangibleThingBuilder implements Builder { /** * Creates new {@link Intangible} instance. */ @@ -35,21 +39,21 @@ public Intangible build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Intangible(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Integer.java b/src/main/java/org/schema/Integer.java deleted file mode 100644 index c1db5144..00000000 --- a/src/main/java/org/schema/Integer.java +++ /dev/null @@ -1,43 +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; - -/** - * Data type: Integer. - */ -public class Integer extends Number { - /** - * Builder for {@link Integer} - */ - public static final class IntegerThingBuilder implements Builder { - /** - * Creates new {@link Integer} instance. - */ - public Integer build() { - return new Integer(); - } - } - public interface Builder extends ThingBuilder { - - } - - protected Integer() { - super(); - } -} diff --git a/src/main/java/org/schema/InteractAction.java b/src/main/java/org/schema/InteractAction.java index 59afe347..34bc0bd2 100644 --- a/src/main/java/org/schema/InteractAction.java +++ b/src/main/java/org/schema/InteractAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of interacting with another person or organization. */ @@ -25,7 +29,7 @@ public class InteractAction extends Action { /** * Builder for {@link InteractAction} */ - public static final class InteractActionThingBuilder implements Builder { + static final class InteractActionThingBuilder implements Builder { /** * Creates new {@link InteractAction} instance. */ @@ -35,7 +39,7 @@ public InteractAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/InteractionCount.java b/src/main/java/org/schema/InteractionCount.java index f880f2c3..de950545 100644 --- a/src/main/java/org/schema/InteractionCount.java +++ b/src/main/java/org/schema/InteractionCount.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This property is deprecated, alongside the UserInteraction types on which it depended. */ @@ -25,7 +29,7 @@ public class InteractionCount { /** * Builder for {@link InteractionCount} */ - public static final class InteractionCountThingBuilder implements Builder { + static final class InteractionCountThingBuilder implements Builder { /** * Creates new {@link InteractionCount} instance. */ @@ -34,7 +38,7 @@ public InteractionCount build() { } } public interface Builder extends ThingBuilder { - + } protected InteractionCount() { diff --git a/src/main/java/org/schema/InternationalTrial.java b/src/main/java/org/schema/InternationalTrial.java index 614526b7..967c0e80 100644 --- a/src/main/java/org/schema/InternationalTrial.java +++ b/src/main/java/org/schema/InternationalTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An international trial. */ @@ -25,7 +29,7 @@ public class InternationalTrial { /** * Builder for {@link InternationalTrial} */ - public static final class InternationalTrialThingBuilder implements Builder { + static final class InternationalTrialThingBuilder implements Builder { /** * Creates new {@link InternationalTrial} instance. */ @@ -34,7 +38,7 @@ public InternationalTrial build() { } } public interface Builder extends ThingBuilder { - + } protected InternationalTrial() { diff --git a/src/main/java/org/schema/InternetCafe.java b/src/main/java/org/schema/InternetCafe.java index 9492b0b5..b6f5c133 100644 --- a/src/main/java/org/schema/InternetCafe.java +++ b/src/main/java/org/schema/InternetCafe.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An internet cafe. */ @@ -25,7 +29,7 @@ public class InternetCafe extends LocalBusiness { /** * Builder for {@link InternetCafe} */ - public static final class InternetCafeThingBuilder implements Builder { + static final class InternetCafeThingBuilder implements Builder { /** * Creates new {@link InternetCafe} instance. */ @@ -35,107 +39,107 @@ public InternetCafe build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/InviteAction.java b/src/main/java/org/schema/InviteAction.java index 9ab9034a..04dbff2b 100644 --- a/src/main/java/org/schema/InviteAction.java +++ b/src/main/java/org/schema/InviteAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of asking someone to attend an event. Reciprocal of RsvpAction. */ @@ -31,7 +35,7 @@ public Event getEvent() { /** * Builder for {@link InviteAction} */ - public static final class InviteActionThingBuilder implements Builder { + static final class InviteActionThingBuilder implements Builder { /** * Creates new {@link InviteAction} instance. */ @@ -41,33 +45,33 @@ public InviteAction build() { /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -75,13 +79,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -89,7 +93,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -97,13 +101,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -111,13 +115,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -125,13 +129,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -139,13 +143,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -153,7 +157,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -161,7 +165,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -170,67 +174,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -264,7 +268,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -299,7 +303,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -332,7 +336,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -340,38 +344,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -399,43 +403,43 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder event(Event event); - Builder event(Event.Builder event); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected InviteAction(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) { diff --git a/src/main/java/org/schema/Invoice.java b/src/main/java/org/schema/Invoice.java index 43dde615..e6a17461 100644 --- a/src/main/java/org/schema/Invoice.java +++ b/src/main/java/org/schema/Invoice.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A statement of the money due for goods or services; a bill. */ @@ -37,7 +41,7 @@ public OrganizationOrPerson getCustomer() { /** * The date that payment is due. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getPaymentDue() { return myPaymentDue; } @@ -86,7 +90,7 @@ public String getAccountId() { /** * The date the invoice is scheduled to be paid. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getScheduledPaymentDate() { return myScheduledPaymentDate; } @@ -111,7 +115,7 @@ public Order getReferencesOrder() { /** * Builder for {@link Invoice} */ - public static final class InvoiceThingBuilder implements Builder { + static final class InvoiceThingBuilder implements Builder { /** * Creates new {@link Invoice} instance. */ @@ -121,14 +125,14 @@ public Invoice build() { /** * A number that confirms the given order or payment has been received. */ - public Builder confirmationNumber(String confirmationNumber) { + @NotNull public Builder confirmationNumber(String confirmationNumber) { this.confirmationNumber = confirmationNumber; return this; } /** * Party placing the order or paying the invoice. */ - public Builder customer(Organization organization) { + @NotNull public Builder customer(Organization organization) { if (this.customer == null) this.customer = new OrganizationOrPerson(); this.customer.setOrganization(organization); return this; @@ -136,13 +140,13 @@ public Builder customer(Organization organization) { /** * Party placing the order or paying the invoice. */ - public Builder customer(Organization.Builder organization) { + @NotNull public Builder customer(Organization.Builder organization) { return this.customer(organization.build()); } /** * Party placing the order or paying the invoice. */ - public Builder customer(Person person) { + @NotNull public Builder customer(Person person) { if (this.customer == null) this.customer = new OrganizationOrPerson(); this.customer.setPerson(person); return this; @@ -150,40 +154,40 @@ public Builder customer(Person person) { /** * Party placing the order or paying the invoice. */ - public Builder customer(Person.Builder person) { + @NotNull public Builder customer(Person.Builder person) { return this.customer(person.build()); } /** * The date that payment is due. */ - public Builder paymentDue(java.util.Date date) { + @NotNull public Builder paymentDue(java.util.Date date) { this.paymentDue = date; return this; } /** * The name of the credit card or other method of payment for the order. */ - public Builder paymentMethod(PaymentMethod paymentMethod) { + @NotNull public Builder paymentMethod(PaymentMethod paymentMethod) { this.paymentMethod = paymentMethod; return this; } /** * The name of the credit card or other method of payment for the order. */ - public Builder paymentMethod(PaymentMethod.Builder paymentMethod) { + @NotNull public Builder paymentMethod(PaymentMethod.Builder paymentMethod) { return this.paymentMethod(paymentMethod.build()); } /** * An identifier for the method of payment used (e.g. the last 4 digits of the credit card). */ - public Builder paymentMethodId(String paymentMethodId) { + @NotNull public Builder paymentMethodId(String paymentMethodId) { this.paymentMethodId = paymentMethodId; return this; } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -191,13 +195,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -205,13 +209,13 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -219,13 +223,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -233,100 +237,100 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * The total amount due. */ - public Builder totalPaymentDue(PriceSpecification priceSpecification) { + @NotNull public Builder totalPaymentDue(PriceSpecification priceSpecification) { this.totalPaymentDue = priceSpecification; return this; } /** * The total amount due. */ - public Builder totalPaymentDue(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPaymentDue(PriceSpecification.Builder priceSpecification) { return this.totalPaymentDue(priceSpecification.build()); } /** * The minimum payment required at this time. */ - public Builder minimumPaymentDue(PriceSpecification priceSpecification) { + @NotNull public Builder minimumPaymentDue(PriceSpecification priceSpecification) { this.minimumPaymentDue = priceSpecification; return this; } /** * The minimum payment required at this time. */ - public Builder minimumPaymentDue(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder minimumPaymentDue(PriceSpecification.Builder priceSpecification) { return this.minimumPaymentDue(priceSpecification.build()); } /** * The identifier for the account the payment will be applied to. */ - public Builder accountId(String accountId) { + @NotNull public Builder accountId(String accountId) { this.accountId = accountId; return this; } /** * The date the invoice is scheduled to be paid. */ - public Builder scheduledPaymentDate(java.util.Date date) { + @NotNull public Builder scheduledPaymentDate(java.util.Date date) { this.scheduledPaymentDate = date; return this; } /** * The time interval used to compute the invoice. */ - public Builder billingPeriod(Duration duration) { + @NotNull public Builder billingPeriod(Duration duration) { this.billingPeriod = duration; return this; } /** * The time interval used to compute the invoice. */ - public Builder billingPeriod(Duration.Builder duration) { + @NotNull public Builder billingPeriod(Duration.Builder duration) { return this.billingPeriod(duration.build()); } /** * The status of payment; whether the invoice has been paid or not. */ - public Builder paymentStatus(String paymentStatus) { + @NotNull public Builder paymentStatus(String paymentStatus) { this.paymentStatus = paymentStatus; return this; } /** * The Order(s) related to this Invoice. One or more Orders may be combined into a single Invoice. */ - public Builder referencesOrder(Order order) { + @NotNull public Builder referencesOrder(Order order) { this.referencesOrder = order; return this; } /** * The Order(s) related to this Invoice. One or more Orders may be combined into a single Invoice. */ - public Builder referencesOrder(Order.Builder order) { + @NotNull public Builder referencesOrder(Order.Builder order) { return this.referencesOrder(order.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -360,7 +364,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -395,7 +399,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -428,7 +432,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -436,38 +440,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -499,46 +503,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder confirmationNumber(String confirmationNumber); - Builder customer(Organization organization); - Builder customer(Organization.Builder organization); - Builder customer(Person person); - Builder customer(Person.Builder person); - Builder paymentDue(java.util.Date date); - Builder paymentMethod(PaymentMethod paymentMethod); - Builder paymentMethod(PaymentMethod.Builder paymentMethod); - Builder paymentMethodId(String paymentMethodId); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder totalPaymentDue(PriceSpecification priceSpecification); - Builder totalPaymentDue(PriceSpecification.Builder priceSpecification); - Builder minimumPaymentDue(PriceSpecification priceSpecification); - Builder minimumPaymentDue(PriceSpecification.Builder priceSpecification); - Builder accountId(String accountId); - Builder scheduledPaymentDate(java.util.Date date); - Builder billingPeriod(Duration duration); - Builder billingPeriod(Duration.Builder duration); - Builder paymentStatus(String paymentStatus); - Builder referencesOrder(Order order); - Builder referencesOrder(Order.Builder order); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder confirmationNumber(String confirmationNumber); + @NotNull Builder customer(Organization organization); + @NotNull Builder customer(Organization.Builder organization); + @NotNull Builder customer(Person person); + @NotNull Builder customer(Person.Builder person); + @NotNull Builder paymentDue(java.util.Date date); + @NotNull Builder paymentMethod(PaymentMethod paymentMethod); + @NotNull Builder paymentMethod(PaymentMethod.Builder paymentMethod); + @NotNull Builder paymentMethodId(String paymentMethodId); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder totalPaymentDue(PriceSpecification priceSpecification); + @NotNull Builder totalPaymentDue(PriceSpecification.Builder priceSpecification); + @NotNull Builder minimumPaymentDue(PriceSpecification priceSpecification); + @NotNull Builder minimumPaymentDue(PriceSpecification.Builder priceSpecification); + @NotNull Builder accountId(String accountId); + @NotNull Builder scheduledPaymentDate(java.util.Date date); + @NotNull Builder billingPeriod(Duration duration); + @NotNull Builder billingPeriod(Duration.Builder duration); + @NotNull Builder paymentStatus(String paymentStatus); + @NotNull Builder referencesOrder(Order order); + @NotNull Builder referencesOrder(Order.Builder order); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Invoice(String confirmationNumber, OrganizationOrPerson customer, java.util.Date paymentDue, PaymentMethod paymentMethod, String paymentMethodId, OrganizationOrPerson provider, OrganizationOrPerson broker, PriceSpecification totalPaymentDue, PriceSpecification minimumPaymentDue, String accountId, java.util.Date scheduledPaymentDate, Duration billingPeriod, String paymentStatus, Order referencesOrder, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/IsPartOf.java b/src/main/java/org/schema/IsPartOf.java index 7284eb5d..ab7f0e7f 100644 --- a/src/main/java/org/schema/IsPartOf.java +++ b/src/main/java/org/schema/IsPartOf.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** */ public interface IsPartOf { diff --git a/src/main/java/org/schema/ItemAvailability.java b/src/main/java/org/schema/ItemAvailability.java index 91c0e728..7b69d4fd 100644 --- a/src/main/java/org/schema/ItemAvailability.java +++ b/src/main/java/org/schema/ItemAvailability.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A list of possible product availability options. */ @@ -25,7 +29,7 @@ public class ItemAvailability extends Enumeration { /** * Builder for {@link ItemAvailability} */ - public static final class ItemAvailabilityThingBuilder implements Builder { + static final class ItemAvailabilityThingBuilder implements Builder { /** * Creates new {@link ItemAvailability} instance. */ @@ -35,7 +39,7 @@ public ItemAvailability build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ItemAvailability(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ItemList.java b/src/main/java/org/schema/ItemList.java index 4bf752ea..29d0c1c8 100644 --- a/src/main/java/org/schema/ItemList.java +++ b/src/main/java/org/schema/ItemList.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A list of items of any sort—for example, Top 10 Movies About Weathermen, or Top 100 Party Songs. Not to be confused with HTML lists, which are often used only for formatting. */ @@ -25,7 +29,7 @@ public class ItemList extends Intangible { /** * The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list. */ - public Integer getNumberOfItems() { + public int getNumberOfItems() { return myNumberOfItems; } /** @@ -47,7 +51,7 @@ public ListItemOrStringOrThing getItemListElement() { /** * Builder for {@link ItemList} */ - public static final class ItemListThingBuilder implements Builder { + static final class ItemListThingBuilder implements Builder { /** * Creates new {@link ItemList} instance. */ @@ -57,14 +61,14 @@ public ItemList build() { /** * The number of items in an ItemList. Note that some descriptions might not fully describe all items in a list (e.g., multi-page pagination); in such cases, the numberOfItems would be for the entire list. */ - public Builder numberOfItems(Integer integer) { - this.numberOfItems = integer; + @NotNull public Builder numberOfItems(int numberOfItems) { + this.numberOfItems = numberOfItems; return this; } /** * Type of ordering (e.g. Ascending, Descending, Unordered). */ - public Builder itemListOrder(ItemListOrderType itemListOrderType) { + @NotNull public Builder itemListOrder(ItemListOrderType itemListOrderType) { if (this.itemListOrder == null) this.itemListOrder = new ItemListOrderTypeOrString(); this.itemListOrder.setItemListOrderType(itemListOrderType); return this; @@ -72,13 +76,13 @@ public Builder itemListOrder(ItemListOrderType itemListOrderType) { /** * Type of ordering (e.g. Ascending, Descending, Unordered). */ - public Builder itemListOrder(ItemListOrderType.Builder itemListOrderType) { + @NotNull public Builder itemListOrder(ItemListOrderType.Builder itemListOrderType) { return this.itemListOrder(itemListOrderType.build()); } /** * Type of ordering (e.g. Ascending, Descending, Unordered). */ - public Builder itemListOrder(String itemListOrder) { + @NotNull public Builder itemListOrder(String itemListOrder) { if (this.itemListOrder == null) this.itemListOrder = new ItemListOrderTypeOrString(); this.itemListOrder.setString(itemListOrder); return this; @@ -90,7 +94,7 @@ public Builder itemListOrder(String itemListOrder) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(ListItem listItem) { + @NotNull public Builder itemListElement(ListItem listItem) { if (this.itemListElement == null) this.itemListElement = new ListItemOrStringOrThing(); this.itemListElement.setListItem(listItem); return this; @@ -102,7 +106,7 @@ public Builder itemListElement(ListItem listItem) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(ListItem.Builder listItem) { + @NotNull public Builder itemListElement(ListItem.Builder listItem) { return this.itemListElement(listItem.build()); } /** @@ -112,7 +116,7 @@ public Builder itemListElement(ListItem.Builder listItem) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(String itemListElement) { + @NotNull public Builder itemListElement(String itemListElement) { if (this.itemListElement == null) this.itemListElement = new ListItemOrStringOrThing(); this.itemListElement.setString(itemListElement); return this; @@ -124,7 +128,7 @@ public Builder itemListElement(String itemListElement) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(Thing thing) { + @NotNull public Builder itemListElement(Thing thing) { if (this.itemListElement == null) this.itemListElement = new ListItemOrStringOrThing(); this.itemListElement.setThing(thing); return this; @@ -136,27 +140,27 @@ public Builder itemListElement(Thing thing) {

Note: The order of elements in your mark-up is not sufficient for indicating the order or elements. Use ListItem with a 'position' property in such cases. */ - public Builder itemListElement(Thing.Builder thing) { + @NotNull public Builder itemListElement(Thing.Builder thing) { return this.itemListElement(thing.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -190,7 +194,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -225,7 +229,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -258,7 +262,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -266,45 +270,45 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private Integer numberOfItems; + private int numberOfItems; private ItemListOrderTypeOrString itemListOrder; private ListItemOrStringOrThing itemListElement; private String additionalType; @@ -318,36 +322,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder numberOfItems(Integer integer); - Builder itemListOrder(ItemListOrderType itemListOrderType); - Builder itemListOrder(ItemListOrderType.Builder itemListOrderType); - Builder itemListOrder(String itemListOrder); - Builder itemListElement(ListItem listItem); - Builder itemListElement(ListItem.Builder listItem); - Builder itemListElement(String itemListElement); - Builder itemListElement(Thing thing); - Builder itemListElement(Thing.Builder thing); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder numberOfItems(int numberOfItems); + @NotNull Builder itemListOrder(ItemListOrderType itemListOrderType); + @NotNull Builder itemListOrder(ItemListOrderType.Builder itemListOrderType); + @NotNull Builder itemListOrder(String itemListOrder); + @NotNull Builder itemListElement(ListItem listItem); + @NotNull Builder itemListElement(ListItem.Builder listItem); + @NotNull Builder itemListElement(String itemListElement); + @NotNull Builder itemListElement(Thing thing); + @NotNull Builder itemListElement(Thing.Builder thing); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected ItemList(Integer numberOfItems, ItemListOrderTypeOrString itemListOrder, ListItemOrStringOrThing itemListElement, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { + protected ItemList(int numberOfItems, ItemListOrderTypeOrString itemListOrder, ListItemOrStringOrThing itemListElement, 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); myNumberOfItems = numberOfItems; myItemListOrder = itemListOrder; myItemListElement = itemListElement; } - private Integer myNumberOfItems; + private int 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 456647eb..583123dd 100644 --- a/src/main/java/org/schema/ItemListOrMusicRecording.java +++ b/src/main/java/org/schema/ItemListOrMusicRecording.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ItemListOrMusicRecording { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myItemList != null) return myItemList; if (myMusicRecording != null) return myMusicRecording; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setItemList(ItemList itemList) { clear(); myItemList = itemList; } public ItemList getItemList() { return myItemList; } - private ItemList myItemList; public void setMusicRecording(MusicRecording musicRecording) { clear(); myMusicRecording = musicRecording; } public MusicRecording getMusicRecording() { return myMusicRecording; } + private ItemList myItemList; private MusicRecording myMusicRecording; private void clear() { myItemList = null; diff --git a/src/main/java/org/schema/ItemListOrString.java b/src/main/java/org/schema/ItemListOrString.java index dc4fc3f4..4a6c801d 100644 --- a/src/main/java/org/schema/ItemListOrString.java +++ b/src/main/java/org/schema/ItemListOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ItemListOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myItemList != null) return myItemList; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setItemList(ItemList itemList) { clear(); myItemList = itemList; } public ItemList getItemList() { return myItemList; } - private ItemList myItemList; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private ItemList myItemList; private String myString; private void clear() { myItemList = null; diff --git a/src/main/java/org/schema/ItemListOrderAscending.java b/src/main/java/org/schema/ItemListOrderAscending.java index 7bc85847..b44be70f 100644 --- a/src/main/java/org/schema/ItemListOrderAscending.java +++ b/src/main/java/org/schema/ItemListOrderAscending.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An ItemList ordered with lower values listed first. */ @@ -25,7 +29,7 @@ public class ItemListOrderAscending { /** * Builder for {@link ItemListOrderAscending} */ - public static final class ItemListOrderAscendingThingBuilder implements Builder { + static final class ItemListOrderAscendingThingBuilder implements Builder { /** * Creates new {@link ItemListOrderAscending} instance. */ @@ -34,7 +38,7 @@ public ItemListOrderAscending build() { } } public interface Builder extends ThingBuilder { - + } protected ItemListOrderAscending() { diff --git a/src/main/java/org/schema/ItemListOrderDescending.java b/src/main/java/org/schema/ItemListOrderDescending.java index 2beab39e..eb885b06 100644 --- a/src/main/java/org/schema/ItemListOrderDescending.java +++ b/src/main/java/org/schema/ItemListOrderDescending.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An ItemList ordered with higher values listed first. */ @@ -25,7 +29,7 @@ public class ItemListOrderDescending { /** * Builder for {@link ItemListOrderDescending} */ - public static final class ItemListOrderDescendingThingBuilder implements Builder { + static final class ItemListOrderDescendingThingBuilder implements Builder { /** * Creates new {@link ItemListOrderDescending} instance. */ @@ -34,7 +38,7 @@ public ItemListOrderDescending build() { } } public interface Builder extends ThingBuilder { - + } protected ItemListOrderDescending() { diff --git a/src/main/java/org/schema/ItemListOrderType.java b/src/main/java/org/schema/ItemListOrderType.java index 7c1fe823..309072a6 100644 --- a/src/main/java/org/schema/ItemListOrderType.java +++ b/src/main/java/org/schema/ItemListOrderType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Enumerated for values for itemListOrder for indicating how an ordered ItemList is organized. */ @@ -25,7 +29,7 @@ public class ItemListOrderType extends Enumeration { /** * Builder for {@link ItemListOrderType} */ - public static final class ItemListOrderTypeThingBuilder implements Builder { + static final class ItemListOrderTypeThingBuilder implements Builder { /** * Creates new {@link ItemListOrderType} instance. */ @@ -35,7 +39,7 @@ public ItemListOrderType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ItemListOrderType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ItemListOrderTypeOrString.java b/src/main/java/org/schema/ItemListOrderTypeOrString.java index 5c16a22f..c525cfce 100644 --- a/src/main/java/org/schema/ItemListOrderTypeOrString.java +++ b/src/main/java/org/schema/ItemListOrderTypeOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ItemListOrderTypeOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myItemListOrderType != null) return myItemListOrderType; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setItemListOrderType(ItemListOrderType itemListOrderType) { clear(); myItemListOrderType = itemListOrderType; } public ItemListOrderType getItemListOrderType() { return myItemListOrderType; } - private ItemListOrderType myItemListOrderType; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private ItemListOrderType myItemListOrderType; private String myString; private void clear() { myItemListOrderType = null; diff --git a/src/main/java/org/schema/ItemListUnordered.java b/src/main/java/org/schema/ItemListUnordered.java index 51a6094a..e4e1341e 100644 --- a/src/main/java/org/schema/ItemListUnordered.java +++ b/src/main/java/org/schema/ItemListUnordered.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An ItemList ordered with no explicit order. */ @@ -25,7 +29,7 @@ public class ItemListUnordered { /** * Builder for {@link ItemListUnordered} */ - public static final class ItemListUnorderedThingBuilder implements Builder { + static final class ItemListUnorderedThingBuilder implements Builder { /** * Creates new {@link ItemListUnordered} instance. */ @@ -34,7 +38,7 @@ public ItemListUnordered build() { } } public interface Builder extends ThingBuilder { - + } protected ItemListUnordered() { diff --git a/src/main/java/org/schema/ItemPage.java b/src/main/java/org/schema/ItemPage.java index c812d8de..f9855dc3 100644 --- a/src/main/java/org/schema/ItemPage.java +++ b/src/main/java/org/schema/ItemPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A page devoted to a single item, such as a particular product or hotel. */ @@ -25,7 +29,7 @@ public class ItemPage extends WebPage { /** * Builder for {@link ItemPage} */ - public static final class ItemPageThingBuilder implements Builder { + static final class ItemPageThingBuilder implements Builder { /** * Creates new {@link ItemPage} instance. */ @@ -35,7 +39,7 @@ public ItemPage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/JewelryStore.java b/src/main/java/org/schema/JewelryStore.java index 7dce8cfd..ca886ed2 100644 --- a/src/main/java/org/schema/JewelryStore.java +++ b/src/main/java/org/schema/JewelryStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A jewelry store. */ @@ -25,7 +29,7 @@ public class JewelryStore extends Store { /** * Builder for {@link JewelryStore} */ - public static final class JewelryStoreThingBuilder implements Builder { + static final class JewelryStoreThingBuilder implements Builder { /** * Creates new {@link JewelryStore} instance. */ @@ -35,107 +39,107 @@ public JewelryStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/JobPosting.java b/src/main/java/org/schema/JobPosting.java index bbb964ff..217987b4 100644 --- a/src/main/java/org/schema/JobPosting.java +++ b/src/main/java/org/schema/JobPosting.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A listing that describes a job opening in a certain organization. */ @@ -37,7 +41,7 @@ public String getJobBenefits() { /** * Publication date for the job posting. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDatePosted() { return myDatePosted; } @@ -134,7 +138,7 @@ public String getWorkHours() { /** * Builder for {@link JobPosting} */ - public static final class JobPostingThingBuilder implements Builder { + static final class JobPostingThingBuilder implements Builder { /** * Creates new {@link JobPosting} instance. */ @@ -144,7 +148,7 @@ public JobPosting build() { /** * The base salary of the job or of an employee in an EmployeeRole. */ - public Builder baseSalary(Number number) { + @NotNull public Builder baseSalary(Number number) { if (this.baseSalary == null) this.baseSalary = new NumberOrPriceSpecification(); this.baseSalary.setNumber(number); return this; @@ -152,7 +156,7 @@ public Builder baseSalary(Number number) { /** * The base salary of the job or of an employee in an EmployeeRole. */ - public Builder baseSalary(PriceSpecification priceSpecification) { + @NotNull public Builder baseSalary(PriceSpecification priceSpecification) { if (this.baseSalary == null) this.baseSalary = new NumberOrPriceSpecification(); this.baseSalary.setPriceSpecification(priceSpecification); return this; @@ -160,158 +164,158 @@ public Builder baseSalary(PriceSpecification priceSpecification) { /** * The base salary of the job or of an employee in an EmployeeRole. */ - public Builder baseSalary(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder baseSalary(PriceSpecification.Builder priceSpecification) { return this.baseSalary(priceSpecification.build()); } /** * Description of benefits associated with the job. */ - public Builder jobBenefits(String jobBenefits) { + @NotNull public Builder jobBenefits(String jobBenefits) { this.jobBenefits = jobBenefits; return this; } /** * Publication date for the job posting. */ - public Builder datePosted(java.util.Date date) { + @NotNull public Builder datePosted(java.util.Date date) { this.datePosted = date; return this; } /** * Educational background needed for the position. */ - public Builder educationRequirements(String educationRequirements) { + @NotNull public Builder educationRequirements(String educationRequirements) { this.educationRequirements = educationRequirements; return this; } /** * Type of employment (e.g. full-time, part-time, contract, temporary, seasonal, internship). */ - public Builder employmentType(String employmentType) { + @NotNull public Builder employmentType(String employmentType) { this.employmentType = employmentType; return this; } /** * Description of skills and experience needed for the position. */ - public Builder experienceRequirements(String experienceRequirements) { + @NotNull public Builder experienceRequirements(String experienceRequirements) { this.experienceRequirements = experienceRequirements; return this; } /** * Organization offering the job position. */ - public Builder hiringOrganization(Organization organization) { + @NotNull public Builder hiringOrganization(Organization organization) { this.hiringOrganization = organization; return this; } /** * Organization offering the job position. */ - public Builder hiringOrganization(Organization.Builder organization) { + @NotNull public Builder hiringOrganization(Organization.Builder organization) { return this.hiringOrganization(organization.build()); } /** * Description of bonus and commission compensation aspects of the job. */ - public Builder incentiveCompensation(String incentiveCompensation) { + @NotNull public Builder incentiveCompensation(String incentiveCompensation) { this.incentiveCompensation = incentiveCompensation; return this; } /** * The industry associated with the job position. */ - public Builder industry(String industry) { + @NotNull public Builder industry(String industry) { this.industry = industry; return this; } /** * A (typically single) geographic location associated with the job position. */ - public Builder jobLocation(Place place) { + @NotNull public Builder jobLocation(Place place) { this.jobLocation = place; return this; } /** * A (typically single) geographic location associated with the job position. */ - public Builder jobLocation(Place.Builder place) { + @NotNull public Builder jobLocation(Place.Builder place) { return this.jobLocation(place.build()); } /** * Category or categories describing the job. Use BLS O*NET-SOC taxonomy: http://www.onetcenter.org/taxonomy.html. Ideally includes textual label and formal code, with the property repeated for each applicable value. */ - public Builder occupationalCategory(String occupationalCategory) { + @NotNull public Builder occupationalCategory(String occupationalCategory) { this.occupationalCategory = occupationalCategory; return this; } /** * Specific qualifications required for this role. */ - public Builder qualifications(String qualifications) { + @NotNull public Builder qualifications(String qualifications) { this.qualifications = qualifications; return this; } /** * Responsibilities associated with this role. */ - public Builder responsibilities(String responsibilities) { + @NotNull public Builder responsibilities(String responsibilities) { this.responsibilities = responsibilities; return this; } /** * The currency (coded using ISO 4217, http://en.wikipedia.org/wiki/ISO_4217 ) used for the main salary information in this job posting or for this employee. */ - public Builder salaryCurrency(String salaryCurrency) { + @NotNull public Builder salaryCurrency(String salaryCurrency) { this.salaryCurrency = salaryCurrency; return this; } /** * Skills required to fulfill this role. */ - public Builder skills(String skills) { + @NotNull public Builder skills(String skills) { this.skills = skills; return this; } /** * Any special commitments associated with this job posting. Valid entries include VeteranCommit, MilitarySpouseCommit, etc. */ - public Builder specialCommitments(String specialCommitments) { + @NotNull public Builder specialCommitments(String specialCommitments) { this.specialCommitments = specialCommitments; return this; } /** * The title of the job. */ - public Builder title(String title) { + @NotNull public Builder title(String title) { this.title = title; return this; } /** * The typical working hours for this job (e.g. 1st shift, night shift, 8am-5pm). */ - public Builder workHours(String workHours) { + @NotNull public Builder workHours(String workHours) { this.workHours = workHours; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -345,7 +349,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -380,7 +384,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -413,7 +417,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -421,38 +425,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -488,40 +492,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder baseSalary(Number number); - Builder baseSalary(PriceSpecification priceSpecification); - Builder baseSalary(PriceSpecification.Builder priceSpecification); - Builder jobBenefits(String jobBenefits); - Builder datePosted(java.util.Date date); - Builder educationRequirements(String educationRequirements); - Builder employmentType(String employmentType); - Builder experienceRequirements(String experienceRequirements); - Builder hiringOrganization(Organization organization); - Builder hiringOrganization(Organization.Builder organization); - Builder incentiveCompensation(String incentiveCompensation); - Builder industry(String industry); - Builder jobLocation(Place place); - Builder jobLocation(Place.Builder place); - Builder occupationalCategory(String occupationalCategory); - Builder qualifications(String qualifications); - Builder responsibilities(String responsibilities); - Builder salaryCurrency(String salaryCurrency); - Builder skills(String skills); - Builder specialCommitments(String specialCommitments); - Builder title(String title); - Builder workHours(String workHours); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder baseSalary(Number number); + @NotNull Builder baseSalary(PriceSpecification priceSpecification); + @NotNull Builder baseSalary(PriceSpecification.Builder priceSpecification); + @NotNull Builder jobBenefits(String jobBenefits); + @NotNull Builder datePosted(java.util.Date date); + @NotNull Builder educationRequirements(String educationRequirements); + @NotNull Builder employmentType(String employmentType); + @NotNull Builder experienceRequirements(String experienceRequirements); + @NotNull Builder hiringOrganization(Organization organization); + @NotNull Builder hiringOrganization(Organization.Builder organization); + @NotNull Builder incentiveCompensation(String incentiveCompensation); + @NotNull Builder industry(String industry); + @NotNull Builder jobLocation(Place place); + @NotNull Builder jobLocation(Place.Builder place); + @NotNull Builder occupationalCategory(String occupationalCategory); + @NotNull Builder qualifications(String qualifications); + @NotNull Builder responsibilities(String responsibilities); + @NotNull Builder salaryCurrency(String salaryCurrency); + @NotNull Builder skills(String skills); + @NotNull Builder specialCommitments(String specialCommitments); + @NotNull Builder title(String title); + @NotNull Builder workHours(String workHours); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/JoinAction.java b/src/main/java/org/schema/JoinAction.java index 53b0a1bd..76f80495 100644 --- a/src/main/java/org/schema/JoinAction.java +++ b/src/main/java/org/schema/JoinAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent joins an event/group with participants/friends at a location.

Related actions:

  • RegisterAction: Unlike RegisterAction, JoinAction refers to joining a group/team of people.
  • SubscribeAction: Unlike SubscribeAction, JoinAction does not imply that you'll be receiving updates.
  • FollowAction: Unlike FollowAction, JoinAction does not imply that you'll be polling for updates
. */ @@ -31,7 +35,7 @@ public Event getEvent() { /** * Builder for {@link JoinAction} */ - public static final class JoinActionThingBuilder implements Builder { + static final class JoinActionThingBuilder implements Builder { /** * Creates new {@link JoinAction} instance. */ @@ -41,20 +45,20 @@ public JoinAction build() { /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -62,13 +66,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -76,7 +80,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -84,7 +88,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -93,67 +97,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -187,7 +191,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -222,7 +226,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -263,38 +267,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -319,32 +323,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder event(Event event); - Builder event(Event.Builder event); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected JoinAction(Event event, 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) { diff --git a/src/main/java/org/schema/Joint.java b/src/main/java/org/schema/Joint.java index 228080c5..d88b91ee 100644 --- a/src/main/java/org/schema/Joint.java +++ b/src/main/java/org/schema/Joint.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The anatomical location at which two or more bones make contact. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -44,7 +48,7 @@ public String getStructuralClass() { /** * Builder for {@link Joint} */ - public static final class JointThingBuilder implements Builder { + static final class JointThingBuilder implements Builder { /** * Creates new {@link Joint} instance. */ @@ -54,213 +58,213 @@ public Joint build() { /** * The biomechanical properties of the bone. */ - public Builder biomechnicalClass(String biomechnicalClass) { + @NotNull public Builder biomechnicalClass(String biomechnicalClass) { this.biomechnicalClass = biomechnicalClass; return this; } /** * The degree of mobility the joint allows. */ - public Builder functionalClass(String functionalClass) { + @NotNull public Builder functionalClass(String functionalClass) { this.functionalClass = functionalClass; return this; } /** * The name given to how bone physically connects to each other. */ - public Builder structuralClass(String structuralClass) { + @NotNull public Builder structuralClass(String structuralClass) { this.structuralClass = structuralClass; return this; } /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -294,7 +298,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -329,7 +333,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -362,7 +366,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -370,38 +374,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -437,47 +441,47 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder biomechnicalClass(String biomechnicalClass); - Builder functionalClass(String functionalClass); - Builder structuralClass(String structuralClass); - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder biomechnicalClass(String biomechnicalClass); + @NotNull Builder functionalClass(String functionalClass); + @NotNull Builder structuralClass(String structuralClass); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Joint(String biomechnicalClass, String functionalClass, String structuralClass, 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) { diff --git a/src/main/java/org/schema/LRMIClass.java b/src/main/java/org/schema/LRMIClass.java index 90ed75b6..3aa02eac 100644 --- a/src/main/java/org/schema/LRMIClass.java +++ b/src/main/java/org/schema/LRMIClass.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This class is based on the work of the LRMI project, see lrmi.net for details. */ @@ -25,7 +29,7 @@ public class LRMIClass { /** * Builder for {@link LRMIClass} */ - public static final class LRMIClassThingBuilder implements Builder { + static final class LRMIClassThingBuilder implements Builder { /** * Creates new {@link LRMIClass} instance. */ @@ -34,7 +38,7 @@ public LRMIClass build() { } } public interface Builder extends ThingBuilder { - + } protected LRMIClass() { diff --git a/src/main/java/org/schema/LaboratoryScience.java b/src/main/java/org/schema/LaboratoryScience.java index fcffa487..8fe0213a 100644 --- a/src/main/java/org/schema/LaboratoryScience.java +++ b/src/main/java/org/schema/LaboratoryScience.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Laboratory science. */ @@ -25,7 +29,7 @@ public class LaboratoryScience { /** * Builder for {@link LaboratoryScience} */ - public static final class LaboratoryScienceThingBuilder implements Builder { + static final class LaboratoryScienceThingBuilder implements Builder { /** * Creates new {@link LaboratoryScience} instance. */ @@ -34,7 +38,7 @@ public LaboratoryScience build() { } } public interface Builder extends ThingBuilder { - + } protected LaboratoryScience() { diff --git a/src/main/java/org/schema/LakeBodyOfWater.java b/src/main/java/org/schema/LakeBodyOfWater.java index 7c0610fb..e49a083c 100644 --- a/src/main/java/org/schema/LakeBodyOfWater.java +++ b/src/main/java/org/schema/LakeBodyOfWater.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A lake (for example, Lake Pontrachain). */ @@ -25,7 +29,7 @@ public class LakeBodyOfWater extends BodyOfWater { /** * Builder for {@link LakeBodyOfWater} */ - public static final class LakeBodyOfWaterThingBuilder implements Builder { + static final class LakeBodyOfWaterThingBuilder implements Builder { /** * Creates new {@link LakeBodyOfWater} instance. */ @@ -35,66 +39,66 @@ public LakeBodyOfWater build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Landform.java b/src/main/java/org/schema/Landform.java index dd8dba25..1f1ab7fd 100644 --- a/src/main/java/org/schema/Landform.java +++ b/src/main/java/org/schema/Landform.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A landform or physical feature. Landform elements include mountains, plains, lakes, rivers, seascape and oceanic waterbody interface features such as bays, peninsulas, seas and so forth, including sub-aqueous terrain features such as submersed mountain ranges, volcanoes, and the great ocean basins. */ @@ -25,7 +29,7 @@ public class Landform extends Place { /** * Builder for {@link Landform} */ - public static final class LandformThingBuilder implements Builder { + static final class LandformThingBuilder implements Builder { /** * Creates new {@link Landform} instance. */ @@ -35,66 +39,66 @@ public Landform build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LandmarksOrHistoricalBuildings.java b/src/main/java/org/schema/LandmarksOrHistoricalBuildings.java index e38e4481..90ea07b4 100644 --- a/src/main/java/org/schema/LandmarksOrHistoricalBuildings.java +++ b/src/main/java/org/schema/LandmarksOrHistoricalBuildings.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An historical landmark or building. */ @@ -25,7 +29,7 @@ public class LandmarksOrHistoricalBuildings extends Place { /** * Builder for {@link LandmarksOrHistoricalBuildings} */ - public static final class LandmarksOrHistoricalBuildingsThingBuilder implements Builder { + static final class LandmarksOrHistoricalBuildingsThingBuilder implements Builder { /** * Creates new {@link LandmarksOrHistoricalBuildings} instance. */ @@ -35,66 +39,66 @@ public LandmarksOrHistoricalBuildings build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Language.java b/src/main/java/org/schema/Language.java index 2c62a052..fe99d788 100644 --- a/src/main/java/org/schema/Language.java +++ b/src/main/java/org/schema/Language.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Natural languages such as Spanish, Tamil, Hindi, English, etc. and programming languages such as Scheme and Lisp. */ @@ -25,7 +29,7 @@ public class Language extends Intangible { /** * Builder for {@link Language} */ - public static final class LanguageThingBuilder implements Builder { + static final class LanguageThingBuilder implements Builder { /** * Creates new {@link Language} instance. */ @@ -35,21 +39,21 @@ public Language build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Language(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/LanguageOrString.java b/src/main/java/org/schema/LanguageOrString.java index ec45b4c5..e7e8af31 100644 --- a/src/main/java/org/schema/LanguageOrString.java +++ b/src/main/java/org/schema/LanguageOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class LanguageOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myLanguage != null) return myLanguage; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setLanguage(Language language) { clear(); myLanguage = language; } public Language getLanguage() { return myLanguage; } - private Language myLanguage; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private Language myLanguage; private String myString; private void clear() { myLanguage = null; diff --git a/src/main/java/org/schema/LaserDiscFormat.java b/src/main/java/org/schema/LaserDiscFormat.java index fde2d290..c7cbc19b 100644 --- a/src/main/java/org/schema/LaserDiscFormat.java +++ b/src/main/java/org/schema/LaserDiscFormat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * LaserDiscFormat. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class LaserDiscFormat { /** * Builder for {@link LaserDiscFormat} */ - public static final class LaserDiscFormatThingBuilder implements Builder { + static final class LaserDiscFormatThingBuilder implements Builder { /** * Creates new {@link LaserDiscFormat} instance. */ @@ -35,7 +39,7 @@ public LaserDiscFormat build() { } } public interface Builder extends ThingBuilder { - + } protected LaserDiscFormat() { diff --git a/src/main/java/org/schema/LeaveAction.java b/src/main/java/org/schema/LeaveAction.java index 8f5b5910..5e4b84a8 100644 --- a/src/main/java/org/schema/LeaveAction.java +++ b/src/main/java/org/schema/LeaveAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent leaves an event / group with participants/friends at a location.

Related actions:

  • JoinAction: The antonym of LeaveAction.
  • UnRegisterAction: Unlike UnRegisterAction, LeaveAction implies leaving a group/team of people rather than a service
. */ @@ -31,7 +35,7 @@ public Event getEvent() { /** * Builder for {@link LeaveAction} */ - public static final class LeaveActionThingBuilder implements Builder { + static final class LeaveActionThingBuilder implements Builder { /** * Creates new {@link LeaveAction} instance. */ @@ -41,20 +45,20 @@ public LeaveAction build() { /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -62,13 +66,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -76,7 +80,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -84,7 +88,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -93,67 +97,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -187,7 +191,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -222,7 +226,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -263,38 +267,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -319,32 +323,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder event(Event event); - Builder event(Event.Builder event); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected LeaveAction(Event event, 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) { diff --git a/src/main/java/org/schema/LeftHandDriving.java b/src/main/java/org/schema/LeftHandDriving.java index d44de843..8e1be1a2 100644 --- a/src/main/java/org/schema/LeftHandDriving.java +++ b/src/main/java/org/schema/LeftHandDriving.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The steering position is on the left side of the vehicle (viewed from the main direction of driving). * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class LeftHandDriving { /** * Builder for {@link LeftHandDriving} */ - public static final class LeftHandDrivingThingBuilder implements Builder { + static final class LeftHandDrivingThingBuilder implements Builder { /** * Creates new {@link LeftHandDriving} instance. */ @@ -35,7 +39,7 @@ public LeftHandDriving build() { } } public interface Builder extends ThingBuilder { - + } protected LeftHandDriving() { diff --git a/src/main/java/org/schema/LegislativeBuilding.java b/src/main/java/org/schema/LegislativeBuilding.java index 6b4f04ea..f136cbd5 100644 --- a/src/main/java/org/schema/LegislativeBuilding.java +++ b/src/main/java/org/schema/LegislativeBuilding.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A legislative building—for example, the state capitol. */ @@ -25,7 +29,7 @@ public class LegislativeBuilding extends GovernmentBuilding { /** * Builder for {@link LegislativeBuilding} */ - public static final class LegislativeBuildingThingBuilder implements Builder { + static final class LegislativeBuildingThingBuilder implements Builder { /** * Creates new {@link LegislativeBuilding} instance. */ @@ -35,73 +39,73 @@ public LegislativeBuilding build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LeisureTimeActivity.java b/src/main/java/org/schema/LeisureTimeActivity.java index 8329ae37..c9138730 100644 --- a/src/main/java/org/schema/LeisureTimeActivity.java +++ b/src/main/java/org/schema/LeisureTimeActivity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any physical activity engaged in for recreational purposes. Examples may include ballroom dancing, roller skating, canoeing, fishing, etc. */ @@ -25,7 +29,7 @@ public class LeisureTimeActivity { /** * Builder for {@link LeisureTimeActivity} */ - public static final class LeisureTimeActivityThingBuilder implements Builder { + static final class LeisureTimeActivityThingBuilder implements Builder { /** * Creates new {@link LeisureTimeActivity} instance. */ @@ -34,7 +38,7 @@ public LeisureTimeActivity build() { } } public interface Builder extends ThingBuilder { - + } protected LeisureTimeActivity() { diff --git a/src/main/java/org/schema/LendAction.java b/src/main/java/org/schema/LendAction.java index 5e4c037e..8981265b 100644 --- a/src/main/java/org/schema/LendAction.java +++ b/src/main/java/org/schema/LendAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of providing an object under an agreement that it will be returned at a later date. Reciprocal of BorrowAction.

Related actions:

. */ @@ -31,7 +35,7 @@ public Person getBorrower() { /** * Builder for {@link LendAction} */ - public static final class LendActionThingBuilder implements Builder { + static final class LendActionThingBuilder implements Builder { /** * Creates new {@link LendAction} instance. */ @@ -41,46 +45,46 @@ public LendAction build() { /** * A sub property of participant. The person that borrows the object being lent. */ - public Builder borrower(Person person) { + @NotNull public Builder borrower(Person person) { this.borrower = person; return this; } /** * A sub property of participant. The person that borrows the object being lent. */ - public Builder borrower(Person.Builder person) { + @NotNull public Builder borrower(Person.Builder person) { return this.borrower(person.build()); } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -88,13 +92,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -102,7 +106,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -110,7 +114,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -119,67 +123,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -213,7 +217,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -248,7 +252,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -281,7 +285,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -289,38 +293,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -347,36 +351,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder borrower(Person person); - Builder borrower(Person.Builder person); - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder borrower(Person person); + @NotNull Builder borrower(Person.Builder person); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected LendAction(Person borrower, 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) { diff --git a/src/main/java/org/schema/Library.java b/src/main/java/org/schema/Library.java index 2e8adce9..9f5520f9 100644 --- a/src/main/java/org/schema/Library.java +++ b/src/main/java/org/schema/Library.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A library. */ @@ -25,7 +29,7 @@ public class Library extends LocalBusiness { /** * Builder for {@link Library} */ - public static final class LibraryThingBuilder implements Builder { + static final class LibraryThingBuilder implements Builder { /** * Creates new {@link Library} instance. */ @@ -35,107 +39,107 @@ public Library build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LifestyleModification.java b/src/main/java/org/schema/LifestyleModification.java index 9c99f49a..d372356c 100644 --- a/src/main/java/org/schema/LifestyleModification.java +++ b/src/main/java/org/schema/LifestyleModification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A process of care involving exercise, changes to diet, fitness routines, and other lifestyle changes aimed at improving a health condition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class LifestyleModification extends MedicalTherapy { /** * Builder for {@link LifestyleModification} */ - public static final class LifestyleModificationThingBuilder implements Builder { + static final class LifestyleModificationThingBuilder implements Builder { /** * Creates new {@link LifestyleModification} instance. */ @@ -36,164 +40,164 @@ public LifestyleModification build() { /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -227,7 +231,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -303,38 +307,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -363,40 +367,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Ligament.java b/src/main/java/org/schema/Ligament.java index 2dbbf6c4..88b5327b 100644 --- a/src/main/java/org/schema/Ligament.java +++ b/src/main/java/org/schema/Ligament.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A short band of tough, flexible, fibrous connective tissue that functions to connect multiple bones, cartilages, and structurally support joints. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class Ligament extends AnatomicalStructure { /** * Builder for {@link Ligament} */ - public static final class LigamentThingBuilder implements Builder { + static final class LigamentThingBuilder implements Builder { /** * Creates new {@link Ligament} instance. */ @@ -36,192 +40,192 @@ public Ligament build() { /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -255,7 +259,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -290,7 +294,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -323,7 +327,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -331,38 +335,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -395,44 +399,44 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LikeAction.java b/src/main/java/org/schema/LikeAction.java index f06a0583..c307d2be 100644 --- a/src/main/java/org/schema/LikeAction.java +++ b/src/main/java/org/schema/LikeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of expressing a positive sentiment about the object. An agent likes an object (a proposition, topic or theme) with participants. */ @@ -25,7 +29,7 @@ public class LikeAction extends ReactAction { /** * Builder for {@link LikeAction} */ - public static final class LikeActionThingBuilder implements Builder { + static final class LikeActionThingBuilder implements Builder { /** * Creates new {@link LikeAction} instance. */ @@ -35,7 +39,7 @@ public LikeAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LimitedAvailability.java b/src/main/java/org/schema/LimitedAvailability.java index 8622ea9d..dddde4d0 100644 --- a/src/main/java/org/schema/LimitedAvailability.java +++ b/src/main/java/org/schema/LimitedAvailability.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item has limited availability. */ @@ -25,7 +29,7 @@ public class LimitedAvailability { /** * Builder for {@link LimitedAvailability} */ - public static final class LimitedAvailabilityThingBuilder implements Builder { + static final class LimitedAvailabilityThingBuilder implements Builder { /** * Creates new {@link LimitedAvailability} instance. */ @@ -34,7 +38,7 @@ public LimitedAvailability build() { } } public interface Builder extends ThingBuilder { - + } protected LimitedAvailability() { diff --git a/src/main/java/org/schema/LiquorStore.java b/src/main/java/org/schema/LiquorStore.java index be6b86ee..68fb4449 100644 --- a/src/main/java/org/schema/LiquorStore.java +++ b/src/main/java/org/schema/LiquorStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A shop that sells alcoholic drinks such as wine, beer, whisky and other spirits. */ @@ -25,7 +29,7 @@ public class LiquorStore extends Store { /** * Builder for {@link LiquorStore} */ - public static final class LiquorStoreThingBuilder implements Builder { + static final class LiquorStoreThingBuilder implements Builder { /** * Creates new {@link LiquorStore} instance. */ @@ -35,107 +39,107 @@ public LiquorStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ListItem.java b/src/main/java/org/schema/ListItem.java index 9de83f8f..ff5124aa 100644 --- a/src/main/java/org/schema/ListItem.java +++ b/src/main/java/org/schema/ListItem.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An list item, e.g. a step in a checklist or how-to description. */ @@ -43,7 +47,7 @@ public ListItem getNextItem() { /** * Builder for {@link ListItem} */ - public static final class ListItemThingBuilder implements Builder { + static final class ListItemThingBuilder implements Builder { /** * Creates new {@link ListItem} instance. */ @@ -53,60 +57,60 @@ public ListItem build() { /** * An entity represented by an entry in a list (e.g. an 'artist' in a list of 'artists')’. */ - public Builder item(Thing thing) { + @NotNull public Builder item(Thing thing) { this.item = thing; return this; } /** * An entity represented by an entry in a list (e.g. an 'artist' in a list of 'artists')’. */ - public Builder item(Thing.Builder thing) { + @NotNull public Builder item(Thing.Builder thing) { return this.item(thing.build()); } /** * A link to the ListItem that preceeds the current one. */ - public Builder previousItem(ListItem listItem) { + @NotNull public Builder previousItem(ListItem listItem) { this.previousItem = listItem; return this; } /** * A link to the ListItem that preceeds the current one. */ - public Builder previousItem(ListItem.Builder listItem) { + @NotNull public Builder previousItem(ListItem.Builder listItem) { return this.previousItem(listItem.build()); } /** * A link to the ListItem that follows the current one. */ - public Builder nextItem(ListItem listItem) { + @NotNull public Builder nextItem(ListItem listItem) { this.nextItem = listItem; return this; } /** * A link to the ListItem that follows the current one. */ - public Builder nextItem(ListItem.Builder listItem) { + @NotNull public Builder nextItem(ListItem.Builder listItem) { return this.nextItem(listItem.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -140,7 +144,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -175,7 +179,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -208,7 +212,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -216,38 +220,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -268,24 +272,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder item(Thing thing); - Builder item(Thing.Builder thing); - Builder previousItem(ListItem listItem); - Builder previousItem(ListItem.Builder listItem); - Builder nextItem(ListItem listItem); - Builder nextItem(ListItem.Builder listItem); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder item(Thing thing); + @NotNull Builder item(Thing.Builder thing); + @NotNull Builder previousItem(ListItem listItem); + @NotNull Builder previousItem(ListItem.Builder listItem); + @NotNull Builder nextItem(ListItem listItem); + @NotNull Builder nextItem(ListItem.Builder listItem); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ListItem(Thing item, ListItem previousItem, ListItem nextItem, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ListItemOrStringOrThing.java b/src/main/java/org/schema/ListItemOrStringOrThing.java index dbff348f..c05a97fe 100644 --- a/src/main/java/org/schema/ListItemOrStringOrThing.java +++ b/src/main/java/org/schema/ListItemOrStringOrThing.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ListItemOrStringOrThing { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myListItem != null) return myListItem; if (myString != null) return myString; @@ -29,12 +32,12 @@ public Object getJsonLdValue() { } public void setListItem(ListItem listItem) { clear(); myListItem = listItem; } public ListItem getListItem() { return myListItem; } - private ListItem myListItem; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } - private String myString; public void setThing(Thing thing) { clear(); myThing = thing; } public Thing getThing() { return myThing; } + private ListItem myListItem; + private String myString; private Thing myThing; private void clear() { myListItem = null; diff --git a/src/main/java/org/schema/ListenAction.java b/src/main/java/org/schema/ListenAction.java index f95ea740..9d6f8861 100644 --- a/src/main/java/org/schema/ListenAction.java +++ b/src/main/java/org/schema/ListenAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of consuming audio content. */ @@ -25,7 +29,7 @@ public class ListenAction extends ConsumeAction { /** * Builder for {@link ListenAction} */ - public static final class ListenActionThingBuilder implements Builder { + static final class ListenActionThingBuilder implements Builder { /** * Creates new {@link ListenAction} instance. */ @@ -35,20 +39,20 @@ public ListenAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LiteraryEvent.java b/src/main/java/org/schema/LiteraryEvent.java index 9a7a1752..d741920e 100644 --- a/src/main/java/org/schema/LiteraryEvent.java +++ b/src/main/java/org/schema/LiteraryEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Literary event. */ @@ -25,7 +29,7 @@ public class LiteraryEvent extends Event { /** * Builder for {@link LiteraryEvent} */ - public static final class LiteraryEventThingBuilder implements Builder { + static final class LiteraryEventThingBuilder implements Builder { /** * Creates new {@link LiteraryEvent} instance. */ @@ -35,20 +39,20 @@ public LiteraryEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LiveAlbum.java b/src/main/java/org/schema/LiveAlbum.java index 27bb7be4..a91bbd47 100644 --- a/src/main/java/org/schema/LiveAlbum.java +++ b/src/main/java/org/schema/LiveAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * LiveAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class LiveAlbum { /** * Builder for {@link LiveAlbum} */ - public static final class LiveAlbumThingBuilder implements Builder { + static final class LiveAlbumThingBuilder implements Builder { /** * Creates new {@link LiveAlbum} instance. */ @@ -35,7 +39,7 @@ public LiveAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected LiveAlbum() { diff --git a/src/main/java/org/schema/LocalBusiness.java b/src/main/java/org/schema/LocalBusiness.java index 9de29d43..62affd1d 100644 --- a/src/main/java/org/schema/LocalBusiness.java +++ b/src/main/java/org/schema/LocalBusiness.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A particular physical business or branch of an organization. Examples of LocalBusiness include a restaurant, a particular branch of a restaurant chain, a branch of a bank, a medical practice, a club, a bowling alley, etc. */ @@ -55,7 +59,7 @@ public String getPriceRange() { /** * Builder for {@link LocalBusiness} */ - public static final class LocalBusinessThingBuilder implements Builder { + static final class LocalBusinessThingBuilder implements Builder { /** * Creates new {@link LocalBusiness} instance. */ @@ -65,107 +69,107 @@ public LocalBusiness build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -524,56 +528,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected LocalBusiness(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) { diff --git a/src/main/java/org/schema/Location.java b/src/main/java/org/schema/Location.java index 9c6364ff..743f7be6 100644 --- a/src/main/java/org/schema/Location.java +++ b/src/main/java/org/schema/Location.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** */ public interface Location { diff --git a/src/main/java/org/schema/LockerDelivery.java b/src/main/java/org/schema/LockerDelivery.java index fb94640d..5d29cdaa 100644 --- a/src/main/java/org/schema/LockerDelivery.java +++ b/src/main/java/org/schema/LockerDelivery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A DeliveryMethod in which an item is made available via locker. */ @@ -25,7 +29,7 @@ public class LockerDelivery extends DeliveryMethod { /** * Builder for {@link LockerDelivery} */ - public static final class LockerDeliveryThingBuilder implements Builder { + static final class LockerDeliveryThingBuilder implements Builder { /** * Creates new {@link LockerDelivery} instance. */ @@ -35,7 +39,7 @@ public LockerDelivery build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected LockerDelivery(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Locksmith.java b/src/main/java/org/schema/Locksmith.java index 14782ab5..cd781b03 100644 --- a/src/main/java/org/schema/Locksmith.java +++ b/src/main/java/org/schema/Locksmith.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A locksmith. */ @@ -25,7 +29,7 @@ public class Locksmith extends ProfessionalService { /** * Builder for {@link Locksmith} */ - public static final class LocksmithThingBuilder implements Builder { + static final class LocksmithThingBuilder implements Builder { /** * Creates new {@link Locksmith} instance. */ @@ -35,107 +39,107 @@ public Locksmith build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LodgingBusiness.java b/src/main/java/org/schema/LodgingBusiness.java index 7774d2cf..8d9ba5ed 100644 --- a/src/main/java/org/schema/LodgingBusiness.java +++ b/src/main/java/org/schema/LodgingBusiness.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A lodging business, such as a motel, hotel, or inn. */ @@ -25,7 +29,7 @@ public class LodgingBusiness extends LocalBusiness { /** * Builder for {@link LodgingBusiness} */ - public static final class LodgingBusinessThingBuilder implements Builder { + static final class LodgingBusinessThingBuilder implements Builder { /** * Creates new {@link LodgingBusiness} instance. */ @@ -35,107 +39,107 @@ public LodgingBusiness build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/LodgingReservation.java b/src/main/java/org/schema/LodgingReservation.java index a1989355..99c11734 100644 --- a/src/main/java/org/schema/LodgingReservation.java +++ b/src/main/java/org/schema/LodgingReservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservation for lodging at a hotel, motel, inn, etc.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. */ @@ -25,14 +29,14 @@ public class LodgingReservation extends Reservation { /** * The earliest someone may check into a lodging establishment. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getCheckinTime() { return myCheckinTime; } /** * The latest someone may check out of a lodging establishment. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getCheckoutTime() { return myCheckoutTime; } @@ -51,19 +55,19 @@ public String getLodgingUnitDescription() { /** * The number of adults staying in the unit. */ - public IntegerOrQuantitativeValue getNumAdults() { + public QuantitativeValueOrInt getNumAdults() { return myNumAdults; } /** * The number of children staying in the unit. */ - public IntegerOrQuantitativeValue getNumChildren() { + public QuantitativeValueOrInt getNumChildren() { return myNumChildren; } /** * Builder for {@link LodgingReservation} */ - public static final class LodgingReservationThingBuilder implements Builder { + static final class LodgingReservationThingBuilder implements Builder { /** * Creates new {@link LodgingReservation} instance. */ @@ -73,21 +77,21 @@ public LodgingReservation build() { /** * The earliest someone may check into a lodging establishment. */ - public Builder checkinTime(java.util.Date date) { + @NotNull public Builder checkinTime(java.util.Date date) { this.checkinTime = date; return this; } /** * The latest someone may check out of a lodging establishment. */ - public Builder checkoutTime(java.util.Date date) { + @NotNull public Builder checkoutTime(java.util.Date date) { this.checkoutTime = date; return this; } /** * Textual description of the unit type (including suite vs. room, size of bed, etc.). */ - public Builder lodgingUnitType(QualitativeValue qualitativeValue) { + @NotNull public Builder lodgingUnitType(QualitativeValue qualitativeValue) { if (this.lodgingUnitType == null) this.lodgingUnitType = new QualitativeValueOrString(); this.lodgingUnitType.setQualitativeValue(qualitativeValue); return this; @@ -95,13 +99,13 @@ public Builder lodgingUnitType(QualitativeValue qualitativeValue) { /** * Textual description of the unit type (including suite vs. room, size of bed, etc.). */ - public Builder lodgingUnitType(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lodgingUnitType(QualitativeValue.Builder qualitativeValue) { return this.lodgingUnitType(qualitativeValue.build()); } /** * Textual description of the unit type (including suite vs. room, size of bed, etc.). */ - public Builder lodgingUnitType(String lodgingUnitType) { + @NotNull public Builder lodgingUnitType(String lodgingUnitType) { if (this.lodgingUnitType == null) this.lodgingUnitType = new QualitativeValueOrString(); this.lodgingUnitType.setString(lodgingUnitType); return this; @@ -109,91 +113,91 @@ public Builder lodgingUnitType(String lodgingUnitType) { /** * A full description of the lodging unit. */ - public Builder lodgingUnitDescription(String lodgingUnitDescription) { + @NotNull public Builder lodgingUnitDescription(String lodgingUnitDescription) { this.lodgingUnitDescription = lodgingUnitDescription; return this; } /** * The number of adults staying in the unit. */ - public Builder numAdults(Integer integer) { - if (this.numAdults == null) this.numAdults = new IntegerOrQuantitativeValue(); - this.numAdults.setInteger(integer); - return this; - } - /** - * The number of adults staying in the unit. - */ - public Builder numAdults(QuantitativeValue quantitativeValue) { - if (this.numAdults == null) this.numAdults = new IntegerOrQuantitativeValue(); + @NotNull public Builder numAdults(QuantitativeValue quantitativeValue) { + if (this.numAdults == null) this.numAdults = new QuantitativeValueOrInt(); this.numAdults.setQuantitativeValue(quantitativeValue); return this; } /** * The number of adults staying in the unit. */ - public Builder numAdults(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numAdults(QuantitativeValue.Builder quantitativeValue) { return this.numAdults(quantitativeValue.build()); } /** - * The number of children staying in the unit. + * The number of adults staying in the unit. */ - public Builder numChildren(Integer integer) { - if (this.numChildren == null) this.numChildren = new IntegerOrQuantitativeValue(); - this.numChildren.setInteger(integer); + @NotNull public Builder numAdults(int numAdults) { + if (this.numAdults == null) this.numAdults = new QuantitativeValueOrInt(); + this.numAdults.setInt(numAdults); return this; } /** * The number of children staying in the unit. */ - public Builder numChildren(QuantitativeValue quantitativeValue) { - if (this.numChildren == null) this.numChildren = new IntegerOrQuantitativeValue(); + @NotNull public Builder numChildren(QuantitativeValue quantitativeValue) { + if (this.numChildren == null) this.numChildren = new QuantitativeValueOrInt(); this.numChildren.setQuantitativeValue(quantitativeValue); return this; } /** * The number of children staying in the unit. */ - public Builder numChildren(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numChildren(QuantitativeValue.Builder quantitativeValue) { return this.numChildren(quantitativeValue.build()); } + /** + * The number of children staying in the unit. + */ + @NotNull public Builder numChildren(int numChildren) { + if (this.numChildren == null) this.numChildren = new QuantitativeValueOrInt(); + this.numChildren.setInt(numChildren); + return this; + } /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -201,13 +205,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -215,13 +219,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -229,13 +233,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -243,53 +247,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -297,7 +301,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -305,13 +309,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -319,14 +323,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -334,13 +338,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -348,27 +352,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -402,7 +406,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -437,7 +441,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -470,7 +474,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -478,38 +482,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -520,8 +524,8 @@ public Builder id(long id) { private java.util.Date checkoutTime; private QualitativeValueOrString lodgingUnitType; private String lodgingUnitDescription; - private IntegerOrQuantitativeValue numAdults; - private IntegerOrQuantitativeValue numChildren; + private QuantitativeValueOrInt numAdults; + private QuantitativeValueOrInt numChildren; private String reservationId; private ReservationStatusType reservationStatus; private Thing reservationFor; @@ -545,61 +549,61 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder checkinTime(java.util.Date date); - Builder checkoutTime(java.util.Date date); - Builder lodgingUnitType(QualitativeValue qualitativeValue); - Builder lodgingUnitType(QualitativeValue.Builder qualitativeValue); - Builder lodgingUnitType(String lodgingUnitType); - Builder lodgingUnitDescription(String lodgingUnitDescription); - Builder numAdults(Integer integer); - Builder numAdults(QuantitativeValue quantitativeValue); - Builder numAdults(QuantitativeValue.Builder quantitativeValue); - Builder numChildren(Integer integer); - Builder numChildren(QuantitativeValue quantitativeValue); - Builder numChildren(QuantitativeValue.Builder quantitativeValue); - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder checkinTime(java.util.Date date); + @NotNull Builder checkoutTime(java.util.Date date); + @NotNull Builder lodgingUnitType(QualitativeValue qualitativeValue); + @NotNull Builder lodgingUnitType(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lodgingUnitType(String lodgingUnitType); + @NotNull Builder lodgingUnitDescription(String lodgingUnitDescription); + @NotNull Builder numAdults(QuantitativeValue quantitativeValue); + @NotNull Builder numAdults(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder numAdults(int numAdults); + @NotNull Builder numChildren(QuantitativeValue quantitativeValue); + @NotNull Builder numChildren(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder numChildren(int numChildren); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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, QuantitativeValueOrInt numAdults, QuantitativeValueOrInt 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) { 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; @@ -612,6 +616,6 @@ protected LodgingReservation(java.util.Date checkinTime, java.util.Date checkout private java.util.Date myCheckoutTime; private QualitativeValueOrString myLodgingUnitType; private String myLodgingUnitDescription; - private IntegerOrQuantitativeValue myNumAdults; - private IntegerOrQuantitativeValue myNumChildren; + private QuantitativeValueOrInt myNumAdults; + private QuantitativeValueOrInt myNumChildren; } diff --git a/src/main/java/org/schema/Longitudinal.java b/src/main/java/org/schema/Longitudinal.java index 7dc96d21..a0749722 100644 --- a/src/main/java/org/schema/Longitudinal.java +++ b/src/main/java/org/schema/Longitudinal.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Unlike cross-sectional studies, longitudinal studies track the same people, and therefore the differences observed in those people are less likely to be the result of cultural differences across generations. Longitudinal studies are also used in medicine to uncover predictors of certain diseases. */ @@ -25,7 +29,7 @@ public class Longitudinal { /** * Builder for {@link Longitudinal} */ - public static final class LongitudinalThingBuilder implements Builder { + static final class LongitudinalThingBuilder implements Builder { /** * Creates new {@link Longitudinal} instance. */ @@ -34,7 +38,7 @@ public Longitudinal build() { } } public interface Builder extends ThingBuilder { - + } protected Longitudinal() { diff --git a/src/main/java/org/schema/LoseAction.java b/src/main/java/org/schema/LoseAction.java index d1e276b8..e03bc0f9 100644 --- a/src/main/java/org/schema/LoseAction.java +++ b/src/main/java/org/schema/LoseAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of being defeated in a competitive activity. */ @@ -31,7 +35,7 @@ public Person getWinner() { /** * Builder for {@link LoseAction} */ - public static final class LoseActionThingBuilder implements Builder { + static final class LoseActionThingBuilder implements Builder { /** * Creates new {@link LoseAction} instance. */ @@ -41,20 +45,20 @@ public LoseAction build() { /** * A sub property of participant. The winner of the action. */ - public Builder winner(Person person) { + @NotNull public Builder winner(Person person) { this.winner = person; return this; } /** * A sub property of participant. The winner of the action. */ - public Builder winner(Person.Builder person) { + @NotNull public Builder winner(Person.Builder person) { return this.winner(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -62,13 +66,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -76,7 +80,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -84,7 +88,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -93,67 +97,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -187,7 +191,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -222,7 +226,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -263,38 +267,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -319,32 +323,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder winner(Person person); - Builder winner(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder winner(Person person); + @NotNull Builder winner(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected LoseAction(Person winner, 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) { diff --git a/src/main/java/org/schema/Lung.java b/src/main/java/org/schema/Lung.java index 42eddada..3dcdaede 100644 --- a/src/main/java/org/schema/Lung.java +++ b/src/main/java/org/schema/Lung.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Lung. */ @@ -25,7 +29,7 @@ public class Lung { /** * Builder for {@link Lung} */ - public static final class LungThingBuilder implements Builder { + static final class LungThingBuilder implements Builder { /** * Creates new {@link Lung} instance. */ @@ -34,7 +38,7 @@ public Lung build() { } } public interface Builder extends ThingBuilder { - + } protected Lung() { diff --git a/src/main/java/org/schema/LymphaticVessel.java b/src/main/java/org/schema/LymphaticVessel.java index b6e04630..6a85b27e 100644 --- a/src/main/java/org/schema/LymphaticVessel.java +++ b/src/main/java/org/schema/LymphaticVessel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A type of blood vessel that specifically carries lymph fluid unidirectionally toward the heart. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -44,7 +48,7 @@ public Vessel getRunsTo() { /** * Builder for {@link LymphaticVessel} */ - public static final class LymphaticVesselThingBuilder implements Builder { + static final class LymphaticVesselThingBuilder implements Builder { /** * Creates new {@link LymphaticVessel} instance. */ @@ -54,20 +58,20 @@ public LymphaticVessel build() { /** * The vasculature the lymphatic structure originates, or afferents, from. */ - public Builder originatesFrom(Vessel vessel) { + @NotNull public Builder originatesFrom(Vessel vessel) { this.originatesFrom = vessel; return this; } /** * The vasculature the lymphatic structure originates, or afferents, from. */ - public Builder originatesFrom(Vessel.Builder vessel) { + @NotNull public Builder originatesFrom(Vessel.Builder vessel) { return this.originatesFrom(vessel.build()); } /** * The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ. */ - public Builder regionDrained(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder regionDrained(AnatomicalStructure anatomicalStructure) { if (this.regionDrained == null) this.regionDrained = new AnatomicalStructureOrAnatomicalSystem(); this.regionDrained.setAnatomicalStructure(anatomicalStructure); return this; @@ -75,13 +79,13 @@ public Builder regionDrained(AnatomicalStructure anatomicalStructure) { /** * The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ. */ - public Builder regionDrained(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder regionDrained(AnatomicalStructure.Builder anatomicalStructure) { return this.regionDrained(anatomicalStructure.build()); } /** * The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ. */ - public Builder regionDrained(AnatomicalSystem anatomicalSystem) { + @NotNull public Builder regionDrained(AnatomicalSystem anatomicalSystem) { if (this.regionDrained == null) this.regionDrained = new AnatomicalStructureOrAnatomicalSystem(); this.regionDrained.setAnatomicalSystem(anatomicalSystem); return this; @@ -89,211 +93,211 @@ public Builder regionDrained(AnatomicalSystem anatomicalSystem) { /** * The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ. */ - public Builder regionDrained(AnatomicalSystem.Builder anatomicalSystem) { + @NotNull public Builder regionDrained(AnatomicalSystem.Builder anatomicalSystem) { return this.regionDrained(anatomicalSystem.build()); } /** * The vasculature the lymphatic structure runs, or efferents, to. */ - public Builder runsTo(Vessel vessel) { + @NotNull public Builder runsTo(Vessel vessel) { this.runsTo = vessel; return this; } /** * The vasculature the lymphatic structure runs, or efferents, to. */ - public Builder runsTo(Vessel.Builder vessel) { + @NotNull public Builder runsTo(Vessel.Builder vessel) { return this.runsTo(vessel.build()); } /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -327,7 +331,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -362,7 +366,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -395,7 +399,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -403,38 +407,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -470,52 +474,52 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder originatesFrom(Vessel vessel); - Builder originatesFrom(Vessel.Builder vessel); - Builder regionDrained(AnatomicalStructure anatomicalStructure); - Builder regionDrained(AnatomicalStructure.Builder anatomicalStructure); - Builder regionDrained(AnatomicalSystem anatomicalSystem); - Builder regionDrained(AnatomicalSystem.Builder anatomicalSystem); - Builder runsTo(Vessel vessel); - Builder runsTo(Vessel.Builder vessel); - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder originatesFrom(Vessel vessel); + @NotNull Builder originatesFrom(Vessel.Builder vessel); + @NotNull Builder regionDrained(AnatomicalStructure anatomicalStructure); + @NotNull Builder regionDrained(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder regionDrained(AnatomicalSystem anatomicalSystem); + @NotNull Builder regionDrained(AnatomicalSystem.Builder anatomicalSystem); + @NotNull Builder runsTo(Vessel vessel); + @NotNull Builder runsTo(Vessel.Builder vessel); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected LymphaticVessel(Vessel originatesFrom, AnatomicalStructureOrAnatomicalSystem regionDrained, Vessel runsTo, 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) { diff --git a/src/main/java/org/schema/MBZ.java b/src/main/java/org/schema/MBZ.java index 93f36930..c79683f1 100644 --- a/src/main/java/org/schema/MBZ.java +++ b/src/main/java/org/schema/MBZ.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This vocabulary was improved through collaboration with the MusicBrainz project * (www.musicbrainz.org), and is partially inspired by the MusicBrainz and @@ -27,7 +31,7 @@ public class MBZ { /** * Builder for {@link MBZ} */ - public static final class MBZThingBuilder implements Builder { + static final class MBZThingBuilder implements Builder { /** * Creates new {@link MBZ} instance. */ @@ -36,7 +40,7 @@ public MBZ build() { } } public interface Builder extends ThingBuilder { - + } protected MBZ() { diff --git a/src/main/java/org/schema/MRI.java b/src/main/java/org/schema/MRI.java index e2551eb6..700bb8fc 100644 --- a/src/main/java/org/schema/MRI.java +++ b/src/main/java/org/schema/MRI.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Magnetic resonance imaging. */ @@ -25,7 +29,7 @@ public class MRI { /** * Builder for {@link MRI} */ - public static final class MRIThingBuilder implements Builder { + static final class MRIThingBuilder implements Builder { /** * Creates new {@link MRI} instance. */ @@ -34,7 +38,7 @@ public MRI build() { } } public interface Builder extends ThingBuilder { - + } protected MRI() { diff --git a/src/main/java/org/schema/Map.java b/src/main/java/org/schema/Map.java index bc39b4c4..fb409182 100644 --- a/src/main/java/org/schema/Map.java +++ b/src/main/java/org/schema/Map.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A map. */ @@ -31,7 +35,7 @@ public MapCategoryType getMapType() { /** * Builder for {@link Map} */ - public static final class MapThingBuilder implements Builder { + static final class MapThingBuilder implements Builder { /** * Creates new {@link Map} instance. */ @@ -41,140 +45,140 @@ public Map build() { /** * Indicates the kind of Map, from the MapCategoryType Enumeration. */ - public Builder mapType(MapCategoryType mapCategoryType) { + @NotNull public Builder mapType(MapCategoryType mapCategoryType) { this.mapType = mapCategoryType; return this; } /** * Indicates the kind of Map, from the MapCategoryType Enumeration. */ - public Builder mapType(MapCategoryType.Builder mapCategoryType) { + @NotNull public Builder mapType(MapCategoryType.Builder mapCategoryType) { return this.mapType(mapCategoryType.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -182,13 +186,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -196,20 +200,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -217,13 +221,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -231,40 +235,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -272,13 +276,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -286,13 +290,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -300,13 +304,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -314,21 +318,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -336,7 +340,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -344,7 +348,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -352,7 +356,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -360,7 +364,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -368,13 +372,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -382,101 +386,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -484,13 +488,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -498,35 +502,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -534,13 +538,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -548,53 +552,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -602,13 +606,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -616,127 +620,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -744,7 +748,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -752,7 +756,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -760,7 +764,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -768,20 +772,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -789,13 +793,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -803,66 +807,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -870,13 +874,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -884,40 +888,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -951,7 +955,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -986,7 +990,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1019,7 +1023,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1027,38 +1031,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1122,7 +1126,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1140,146 +1144,146 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder mapType(MapCategoryType mapCategoryType); - Builder mapType(MapCategoryType.Builder mapCategoryType); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder mapType(MapCategoryType mapCategoryType); + @NotNull Builder mapType(MapCategoryType.Builder mapCategoryType); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Map(MapCategoryType mapType, 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) { + protected Map(MapCategoryType mapType, 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, int 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); myMapType = mapType; } diff --git a/src/main/java/org/schema/MapCategoryType.java b/src/main/java/org/schema/MapCategoryType.java index ce0e3917..2afe334a 100644 --- a/src/main/java/org/schema/MapCategoryType.java +++ b/src/main/java/org/schema/MapCategoryType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An enumeration of several kinds of Map. */ @@ -25,7 +29,7 @@ public class MapCategoryType extends Enumeration { /** * Builder for {@link MapCategoryType} */ - public static final class MapCategoryTypeThingBuilder implements Builder { + static final class MapCategoryTypeThingBuilder implements Builder { /** * Creates new {@link MapCategoryType} instance. */ @@ -35,7 +39,7 @@ public MapCategoryType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MapCategoryType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MapOrString.java b/src/main/java/org/schema/MapOrString.java index 02bb22c7..19d41af9 100644 --- a/src/main/java/org/schema/MapOrString.java +++ b/src/main/java/org/schema/MapOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class MapOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myMap != null) return myMap; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setMap(Map map) { clear(); myMap = map; } public Map getMap() { return myMap; } - private Map myMap; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private Map myMap; private String myString; private void clear() { myMap = null; diff --git a/src/main/java/org/schema/MarryAction.java b/src/main/java/org/schema/MarryAction.java index 837a0c93..61f4e943 100644 --- a/src/main/java/org/schema/MarryAction.java +++ b/src/main/java/org/schema/MarryAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of marrying a person. */ @@ -25,7 +29,7 @@ public class MarryAction extends InteractAction { /** * Builder for {@link MarryAction} */ - public static final class MarryActionThingBuilder implements Builder { + static final class MarryActionThingBuilder implements Builder { /** * Creates new {@link MarryAction} instance. */ @@ -35,7 +39,7 @@ public MarryAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Mass.java b/src/main/java/org/schema/Mass.java index eabb60f6..85ba30b4 100644 --- a/src/main/java/org/schema/Mass.java +++ b/src/main/java/org/schema/Mass.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Properties that take Mass as values are of the form '<Number> <Mass unit of measure>'. E.g., '7 kg'. */ @@ -25,7 +29,7 @@ public class Mass extends Quantity { /** * Builder for {@link Mass} */ - public static final class MassThingBuilder implements Builder { + static final class MassThingBuilder implements Builder { /** * Creates new {@link Mass} instance. */ @@ -35,21 +39,21 @@ public Mass build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Mass(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MaximumDoseSchedule.java b/src/main/java/org/schema/MaximumDoseSchedule.java index 59256a8a..2cf5b941 100644 --- a/src/main/java/org/schema/MaximumDoseSchedule.java +++ b/src/main/java/org/schema/MaximumDoseSchedule.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The maximum dosing schedule considered safe for a drug or supplement as recommended by an authority or by the drug/supplement's manufacturer. Capture the recommending authority in the recognizingAuthority property of MedicalEntity. */ @@ -25,7 +29,7 @@ public class MaximumDoseSchedule extends DoseSchedule { /** * Builder for {@link MaximumDoseSchedule} */ - public static final class MaximumDoseScheduleThingBuilder implements Builder { + static final class MaximumDoseScheduleThingBuilder implements Builder { /** * Creates new {@link MaximumDoseSchedule} instance. */ @@ -35,22 +39,22 @@ public MaximumDoseSchedule build() { /** * The unit of the dose, e.g. 'mg'. */ - public Builder doseUnit(String doseUnit) { + @NotNull public Builder doseUnit(String doseUnit) { this.doseUnit = doseUnit; return this; } /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Integer integer) { + @NotNull public Builder doseValue(int doseValue) { if (this.doseValue == null) this.doseValue = new Number(); - this.doseValue.setInteger(integer); + this.doseValue.setInt(doseValue); return this; } /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Long doseValue) { + @NotNull public Builder doseValue(long doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setLong(doseValue); return this; @@ -58,7 +62,7 @@ public Builder doseValue(Long doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Float doseValue) { + @NotNull public Builder doseValue(float doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setFloat(doseValue); return this; @@ -66,7 +70,7 @@ public Builder doseValue(Float doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Double doseValue) { + @NotNull public Builder doseValue(double doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setDouble(doseValue); return this; @@ -74,7 +78,7 @@ public Builder doseValue(Double doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(String doseValue) { + @NotNull public Builder doseValue(String doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setString(doseValue); return this; @@ -82,113 +86,113 @@ public Builder doseValue(String doseValue) { /** * How often the dose is taken, e.g. 'daily'. */ - public Builder frequency(String frequency) { + @NotNull public Builder frequency(String frequency) { this.frequency = frequency; return this; } /** * Characteristics of the population for which this is intended, or which typically uses it, e.g. 'adults'. */ - public Builder targetPopulation(String targetPopulation) { + @NotNull public Builder targetPopulation(String targetPopulation) { this.targetPopulation = targetPopulation; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -222,7 +226,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -257,7 +261,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -290,7 +294,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -298,38 +302,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -357,38 +361,38 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder doseUnit(String doseUnit); - Builder doseValue(Integer integer); - Builder doseValue(Long doseValue); - Builder doseValue(Float doseValue); - Builder doseValue(Double doseValue); - Builder doseValue(String doseValue); - Builder frequency(String frequency); - Builder targetPopulation(String targetPopulation); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder doseUnit(String doseUnit); + @NotNull Builder doseValue(int doseValue); + @NotNull Builder doseValue(long doseValue); + @NotNull Builder doseValue(float doseValue); + @NotNull Builder doseValue(double doseValue); + @NotNull Builder doseValue(String doseValue); + @NotNull Builder frequency(String frequency); + @NotNull Builder targetPopulation(String targetPopulation); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MediaObject.java b/src/main/java/org/schema/MediaObject.java index 449d59a8..b9fc1f14 100644 --- a/src/main/java/org/schema/MediaObject.java +++ b/src/main/java/org/schema/MediaObject.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An image, video, or audio object embedded in a web page. Note that a creative work may have many media objects associated with it on the same web page. For example, a page about a single song (MusicRecording) may have a music video (VideoObject), and a high and low bandwidth audio stream (2 AudioObject's). */ @@ -73,7 +77,7 @@ public String getEncodingFormat() { /** * Date the content expires and is no longer useful or available. Useful for videos. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getExpires() { return myExpires; } @@ -110,7 +114,7 @@ public Boolean getRequiresSubscription() { /** * Date when this media object was uploaded to this site. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getUploadDate() { return myUploadDate; } @@ -123,7 +127,7 @@ public DistanceOrQuantitativeValue getWidth() { /** * Builder for {@link MediaObject} */ - public static final class MediaObjectThingBuilder implements Builder { + static final class MediaObjectThingBuilder implements Builder { /** * Creates new {@link MediaObject} instance. */ @@ -133,88 +137,88 @@ public MediaObject build() { /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle newsArticle) { this.associatedArticle = newsArticle; return this; } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle.Builder newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle.Builder newsArticle) { return this.associatedArticle(newsArticle.build()); } /** * The bitrate of the media object. */ - public Builder bitrate(String bitrate) { + @NotNull public Builder bitrate(String bitrate) { this.bitrate = bitrate; return this; } /** * File size in (mega/kilo) bytes. */ - public Builder contentSize(String contentSize) { + @NotNull public Builder contentSize(String contentSize) { this.contentSize = contentSize; return this; } /** * Actual bytes of the media object, for example the image file or video file. */ - public Builder contentUrl(String contentUrl) { + @NotNull public Builder contentUrl(String contentUrl) { this.contentUrl = contentUrl; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * A URL pointing to a player for a specific video. In general, this is the information in the src element of an embed tag and should not be the same as the content of the loc tag. */ - public Builder embedUrl(String embedUrl) { + @NotNull public Builder embedUrl(String embedUrl) { this.embedUrl = embedUrl; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork creativeWork) { this.encodesCreativeWork = creativeWork; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { return this.encodesCreativeWork(creativeWork.build()); } /** * mp3, mpeg4, etc. */ - public Builder encodingFormat(String encodingFormat) { + @NotNull public Builder encodingFormat(String encodingFormat) { this.encodingFormat = encodingFormat; return this; } /** * Date the content expires and is no longer useful or available. Useful for videos. */ - public Builder expires(java.util.Date date) { + @NotNull public Builder expires(java.util.Date date) { this.expires = date; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -222,13 +226,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -236,60 +240,60 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * Player type required—for example, Flash or Silverlight. */ - public Builder playerType(String playerType) { + @NotNull public Builder playerType(String playerType) { this.playerType = playerType; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place place) { + @NotNull public Builder regionsAllowed(Place place) { this.regionsAllowed = place; return this; } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place.Builder place) { + @NotNull public Builder regionsAllowed(Place.Builder place) { return this.regionsAllowed(place.build()); } /** * Indicates if use of the media require a subscription (either paid or free). Allowed values are true or false (note that an earlier version had 'yes', 'no'). */ - public Builder requiresSubscription(Boolean requiresSubscription) { + @NotNull public Builder requiresSubscription(Boolean requiresSubscription) { this.requiresSubscription = requiresSubscription; return this; } /** * Date when this media object was uploaded to this site. */ - public Builder uploadDate(java.util.Date date) { + @NotNull public Builder uploadDate(java.util.Date date) { this.uploadDate = date; return this; } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -297,13 +301,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -311,133 +315,133 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -445,13 +449,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -459,20 +463,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -480,13 +484,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -494,40 +498,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -535,13 +539,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -549,13 +553,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -563,13 +567,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -577,21 +581,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -599,7 +603,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -607,7 +611,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -615,7 +619,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -623,7 +627,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -631,13 +635,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -645,101 +649,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -747,13 +751,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -761,35 +765,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -797,13 +801,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -811,53 +815,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -865,13 +869,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -879,127 +883,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -1007,7 +1011,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -1015,7 +1019,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -1023,7 +1027,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -1031,20 +1035,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -1052,13 +1056,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -1066,66 +1070,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1133,13 +1137,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1147,40 +1151,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1214,7 +1218,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1249,7 +1253,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1282,7 +1286,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1290,38 +1294,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1400,7 +1404,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1418,171 +1422,171 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedArticle(NewsArticle newsArticle); - Builder associatedArticle(NewsArticle.Builder newsArticle); - Builder bitrate(String bitrate); - Builder contentSize(String contentSize); - Builder contentUrl(String contentUrl); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder embedUrl(String embedUrl); - Builder encodesCreativeWork(CreativeWork creativeWork); - Builder encodesCreativeWork(CreativeWork.Builder creativeWork); - Builder encodingFormat(String encodingFormat); - Builder expires(java.util.Date date); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder playerType(String playerType); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder regionsAllowed(Place place); - Builder regionsAllowed(Place.Builder place); - Builder requiresSubscription(Boolean requiresSubscription); - Builder uploadDate(java.util.Date date); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedArticle(NewsArticle newsArticle); + @NotNull Builder associatedArticle(NewsArticle.Builder newsArticle); + @NotNull Builder bitrate(String bitrate); + @NotNull Builder contentSize(String contentSize); + @NotNull Builder contentUrl(String contentUrl); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder embedUrl(String embedUrl); + @NotNull Builder encodesCreativeWork(CreativeWork creativeWork); + @NotNull Builder encodesCreativeWork(CreativeWork.Builder creativeWork); + @NotNull Builder encodingFormat(String encodingFormat); + @NotNull Builder expires(java.util.Date date); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder playerType(String playerType); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder regionsAllowed(Place place); + @NotNull Builder regionsAllowed(Place.Builder place); + @NotNull Builder requiresSubscription(Boolean requiresSubscription); + @NotNull Builder uploadDate(java.util.Date date); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MediaObject(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) { + protected MediaObject(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, int 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); myAssociatedArticle = associatedArticle; myBitrate = bitrate; diff --git a/src/main/java/org/schema/MedicalAudience.java b/src/main/java/org/schema/MedicalAudience.java index b4012fc6..9c4f5405 100644 --- a/src/main/java/org/schema/MedicalAudience.java +++ b/src/main/java/org/schema/MedicalAudience.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Target audiences for medical web pages. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalAudience extends PeopleAudience { /** * Builder for {@link MedicalAudience} */ - public static final class MedicalAudienceThingBuilder implements Builder { + static final class MedicalAudienceThingBuilder implements Builder { /** * Creates new {@link MedicalAudience} instance. */ @@ -36,56 +40,56 @@ public MedicalAudience build() { /** * Expectations for health conditions of target audience. */ - public Builder healthCondition(MedicalCondition medicalCondition) { + @NotNull public Builder healthCondition(MedicalCondition medicalCondition) { this.healthCondition = medicalCondition; return this; } /** * Expectations for health conditions of target audience. */ - public Builder healthCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder healthCondition(MedicalCondition.Builder medicalCondition) { return this.healthCondition(medicalCondition.build()); } /** * Audiences defined by a person's gender. */ - public Builder requiredGender(String requiredGender) { + @NotNull public Builder requiredGender(String requiredGender) { this.requiredGender = requiredGender; return this; } /** * Audiences defined by a person's maximum age. */ - public Builder requiredMaxAge(Integer integer) { - this.requiredMaxAge = integer; + @NotNull public Builder requiredMaxAge(int requiredMaxAge) { + this.requiredMaxAge = requiredMaxAge; return this; } /** * Audiences defined by a person's minimum age. */ - public Builder requiredMinAge(Integer integer) { - this.requiredMinAge = integer; + @NotNull public Builder requiredMinAge(int requiredMinAge) { + this.requiredMinAge = requiredMinAge; return this; } /** * The gender of the person or audience. */ - public Builder suggestedGender(String suggestedGender) { + @NotNull public Builder suggestedGender(String suggestedGender) { this.suggestedGender = suggestedGender; return this; } /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Integer integer) { + @NotNull public Builder suggestedMaxAge(int suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); - this.suggestedMaxAge.setInteger(integer); + this.suggestedMaxAge.setInt(suggestedMaxAge); return this; } /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Long suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(long suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setLong(suggestedMaxAge); return this; @@ -93,7 +97,7 @@ public Builder suggestedMaxAge(Long suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Float suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(float suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setFloat(suggestedMaxAge); return this; @@ -101,7 +105,7 @@ public Builder suggestedMaxAge(Float suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Double suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(double suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setDouble(suggestedMaxAge); return this; @@ -109,7 +113,7 @@ public Builder suggestedMaxAge(Double suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(String suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(String suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setString(suggestedMaxAge); return this; @@ -117,15 +121,15 @@ public Builder suggestedMaxAge(String suggestedMaxAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Integer integer) { + @NotNull public Builder suggestedMinAge(int suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); - this.suggestedMinAge.setInteger(integer); + this.suggestedMinAge.setInt(suggestedMinAge); return this; } /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Long suggestedMinAge) { + @NotNull public Builder suggestedMinAge(long suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setLong(suggestedMinAge); return this; @@ -133,7 +137,7 @@ public Builder suggestedMinAge(Long suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Float suggestedMinAge) { + @NotNull public Builder suggestedMinAge(float suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setFloat(suggestedMinAge); return this; @@ -141,7 +145,7 @@ public Builder suggestedMinAge(Float suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Double suggestedMinAge) { + @NotNull public Builder suggestedMinAge(double suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setDouble(suggestedMinAge); return this; @@ -149,7 +153,7 @@ public Builder suggestedMinAge(Double suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(String suggestedMinAge) { + @NotNull public Builder suggestedMinAge(String suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setString(suggestedMinAge); return this; @@ -157,41 +161,41 @@ public Builder suggestedMinAge(String suggestedMinAge) { /** * The target group associated with a given audience (e.g. veterans, car owners, musicians, etc.). */ - public Builder audienceType(String audienceType) { + @NotNull public Builder audienceType(String audienceType) { this.audienceType = audienceType; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea administrativeArea) { this.geographicArea = administrativeArea; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { return this.geographicArea(administrativeArea.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -225,7 +229,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -260,7 +264,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -293,7 +297,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -301,38 +305,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -341,8 +345,8 @@ public Builder id(long id) { } private MedicalCondition healthCondition; private String requiredGender; - private Integer requiredMaxAge; - private Integer requiredMinAge; + private int requiredMaxAge; + private int requiredMinAge; private String suggestedGender; private Number suggestedMaxAge; private Number suggestedMinAge; @@ -359,40 +363,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder healthCondition(MedicalCondition medicalCondition); - Builder healthCondition(MedicalCondition.Builder medicalCondition); - Builder requiredGender(String requiredGender); - Builder requiredMaxAge(Integer integer); - Builder requiredMinAge(Integer integer); - Builder suggestedGender(String suggestedGender); - Builder suggestedMaxAge(Integer integer); - Builder suggestedMaxAge(Long suggestedMaxAge); - Builder suggestedMaxAge(Float suggestedMaxAge); - Builder suggestedMaxAge(Double suggestedMaxAge); - Builder suggestedMaxAge(String suggestedMaxAge); - Builder suggestedMinAge(Integer integer); - Builder suggestedMinAge(Long suggestedMinAge); - Builder suggestedMinAge(Float suggestedMinAge); - Builder suggestedMinAge(Double suggestedMinAge); - Builder suggestedMinAge(String suggestedMinAge); - Builder audienceType(String audienceType); - Builder geographicArea(AdministrativeArea administrativeArea); - Builder geographicArea(AdministrativeArea.Builder administrativeArea); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder healthCondition(MedicalCondition medicalCondition); + @NotNull Builder healthCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder requiredGender(String requiredGender); + @NotNull Builder requiredMaxAge(int requiredMaxAge); + @NotNull Builder requiredMinAge(int requiredMinAge); + @NotNull Builder suggestedGender(String suggestedGender); + @NotNull Builder suggestedMaxAge(int suggestedMaxAge); + @NotNull Builder suggestedMaxAge(long suggestedMaxAge); + @NotNull Builder suggestedMaxAge(float suggestedMaxAge); + @NotNull Builder suggestedMaxAge(double suggestedMaxAge); + @NotNull Builder suggestedMaxAge(String suggestedMaxAge); + @NotNull Builder suggestedMinAge(int suggestedMinAge); + @NotNull Builder suggestedMinAge(long suggestedMinAge); + @NotNull Builder suggestedMinAge(float suggestedMinAge); + @NotNull Builder suggestedMinAge(double suggestedMinAge); + @NotNull Builder suggestedMinAge(String suggestedMinAge); + @NotNull Builder audienceType(String audienceType); + @NotNull Builder geographicArea(AdministrativeArea administrativeArea); + @NotNull Builder geographicArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + protected MedicalAudience(MedicalCondition healthCondition, String requiredGender, int requiredMaxAge, int 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); } } diff --git a/src/main/java/org/schema/MedicalCause.java b/src/main/java/org/schema/MedicalCause.java index 0d7032ef..edd2e875 100644 --- a/src/main/java/org/schema/MedicalCause.java +++ b/src/main/java/org/schema/MedicalCause.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The causative agent(s) that are responsible for the pathophysiologic process that eventually results in a medical condition, symptom or sign. In this schema, unless otherwise specified this is meant to be the proximate cause of the medical condition, symptom or sign. The proximate cause is defined as the causative agent that most directly results in the medical condition, symptom or sign. For example, the HIV virus could be considered a cause of AIDS. Or in a diagnostic context, if a patient fell and sustained a hip fracture and two days later sustained a pulmonary embolism which eventuated in a cardiac arrest, the cause of the cardiac arrest (the proximate cause) would be the pulmonary embolism and not the fall.

Medical causes can include cardiovascular, chemical, dermatologic, endocrine, environmental, gastroenterologic, genetic, hematologic, gynecologic, iatrogenic, infectious, musculoskeletal, neurologic, nutritional, obstetric, oncologic, otolaryngologic, pharmacologic, psychiatric, pulmonary, renal, rheumatologic, toxic, traumatic, or urologic causes; medical conditions can be causes as well. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public MedicalEntity getCauseOf() { /** * Builder for {@link MedicalCause} */ - public static final class MedicalCauseThingBuilder implements Builder { + static final class MedicalCauseThingBuilder implements Builder { /** * Creates new {@link MedicalCause} instance. */ @@ -42,112 +46,112 @@ public MedicalCause build() { /** * The condition, complication, symptom, sign, etc. caused. */ - public Builder causeOf(MedicalEntity medicalEntity) { + @NotNull public Builder causeOf(MedicalEntity medicalEntity) { this.causeOf = medicalEntity; return this; } /** * The condition, complication, symptom, sign, etc. caused. */ - public Builder causeOf(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder causeOf(MedicalEntity.Builder medicalEntity) { return this.causeOf(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder causeOf(MedicalEntity medicalEntity); - Builder causeOf(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder causeOf(MedicalEntity medicalEntity); + @NotNull Builder causeOf(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalCause(MedicalEntity causeOf, 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) { diff --git a/src/main/java/org/schema/MedicalClinic.java b/src/main/java/org/schema/MedicalClinic.java index 97c05293..8647e15e 100644 --- a/src/main/java/org/schema/MedicalClinic.java +++ b/src/main/java/org/schema/MedicalClinic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical clinic. */ @@ -37,7 +41,7 @@ public MedicalSpecialty getMedicalSpecialty() { /** * Builder for {@link MedicalClinic} */ - public static final class MedicalClinicThingBuilder implements Builder { + static final class MedicalClinicThingBuilder implements Builder { /** * Creates new {@link MedicalClinic} instance. */ @@ -47,7 +51,7 @@ public MedicalClinic build() { /** * A medical service available from this provider. */ - public Builder availableService(MedicalProcedure medicalProcedure) { + @NotNull public Builder availableService(MedicalProcedure medicalProcedure) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalProcedure(medicalProcedure); return this; @@ -55,13 +59,13 @@ public Builder availableService(MedicalProcedure medicalProcedure) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalProcedure.Builder medicalProcedure) { + @NotNull public Builder availableService(MedicalProcedure.Builder medicalProcedure) { return this.availableService(medicalProcedure.build()); } /** * A medical service available from this provider. */ - public Builder availableService(MedicalTest medicalTest) { + @NotNull public Builder availableService(MedicalTest medicalTest) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalTest(medicalTest); return this; @@ -69,13 +73,13 @@ public Builder availableService(MedicalTest medicalTest) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalTest.Builder medicalTest) { + @NotNull public Builder availableService(MedicalTest.Builder medicalTest) { return this.availableService(medicalTest.build()); } /** * A medical service available from this provider. */ - public Builder availableService(MedicalTherapy medicalTherapy) { + @NotNull public Builder availableService(MedicalTherapy medicalTherapy) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalTherapy(medicalTherapy); return this; @@ -83,126 +87,126 @@ public Builder availableService(MedicalTherapy medicalTherapy) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder availableService(MedicalTherapy.Builder medicalTherapy) { return this.availableService(medicalTherapy.build()); } /** * A medical specialty of the provider. */ - public Builder medicalSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder medicalSpecialty(MedicalSpecialty medicalSpecialty) { this.medicalSpecialty = medicalSpecialty; return this; } /** * A medical specialty of the provider. */ - public Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.medicalSpecialty(medicalSpecialty.build()); } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -210,13 +214,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -224,27 +228,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -252,13 +256,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -266,7 +270,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -274,13 +278,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -288,20 +292,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -309,13 +313,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -323,26 +327,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -352,7 +356,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -362,27 +366,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -416,7 +420,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -451,7 +455,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -484,7 +488,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -492,38 +496,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -563,64 +567,64 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder availableService(MedicalProcedure medicalProcedure); - Builder availableService(MedicalProcedure.Builder medicalProcedure); - Builder availableService(MedicalTest medicalTest); - Builder availableService(MedicalTest.Builder medicalTest); - Builder availableService(MedicalTherapy medicalTherapy); - Builder availableService(MedicalTherapy.Builder medicalTherapy); - Builder medicalSpecialty(MedicalSpecialty medicalSpecialty); - Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder availableService(MedicalProcedure medicalProcedure); + @NotNull Builder availableService(MedicalProcedure.Builder medicalProcedure); + @NotNull Builder availableService(MedicalTest medicalTest); + @NotNull Builder availableService(MedicalTest.Builder medicalTest); + @NotNull Builder availableService(MedicalTherapy medicalTherapy); + @NotNull Builder availableService(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder medicalSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalClinic(MedicalProcedureOrMedicalTestOrMedicalTherapy availableService, MedicalSpecialty medicalSpecialty, 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) { diff --git a/src/main/java/org/schema/MedicalCode.java b/src/main/java/org/schema/MedicalCode.java index 582b9a41..1f74146b 100644 --- a/src/main/java/org/schema/MedicalCode.java +++ b/src/main/java/org/schema/MedicalCode.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A code for a medical entity. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -38,7 +42,7 @@ public String getCodingSystem() { /** * Builder for {@link MedicalCode} */ - public static final class MedicalCodeThingBuilder implements Builder { + static final class MedicalCodeThingBuilder implements Builder { /** * Creates new {@link MedicalCode} instance. */ @@ -48,113 +52,113 @@ public MedicalCode build() { /** * The actual code. */ - public Builder codeValue(String codeValue) { + @NotNull public Builder codeValue(String codeValue) { this.codeValue = codeValue; return this; } /** * The coding system, e.g. 'ICD-10'. */ - public Builder codingSystem(String codingSystem) { + @NotNull public Builder codingSystem(String codingSystem) { this.codingSystem = codingSystem; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -188,7 +192,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -223,7 +227,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -256,7 +260,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -264,38 +268,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -321,32 +325,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder codeValue(String codeValue); - Builder codingSystem(String codingSystem); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder codeValue(String codeValue); + @NotNull Builder codingSystem(String codingSystem); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalCode(String codeValue, String codingSystem, 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) { diff --git a/src/main/java/org/schema/MedicalCondition.java b/src/main/java/org/schema/MedicalCondition.java index 141141b8..69220dc7 100644 --- a/src/main/java/org/schema/MedicalCondition.java +++ b/src/main/java/org/schema/MedicalCondition.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any condition of the human body that affects the normal functioning of a person, whether physically or mentally. Includes diseases, injuries, disabilities, disorders, syndromes, etc. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -122,7 +126,7 @@ public MedicalTest getTypicalTest() { /** * Builder for {@link MedicalCondition} */ - public static final class MedicalConditionThingBuilder implements Builder { + static final class MedicalConditionThingBuilder implements Builder { /** * Creates new {@link MedicalCondition} instance. */ @@ -132,7 +136,7 @@ public MedicalCondition build() { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setAnatomicalStructure(anatomicalStructure); return this; @@ -140,13 +144,13 @@ public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { return this.associatedAnatomy(anatomicalStructure.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { + @NotNull public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setAnatomicalSystem(anatomicalSystem); return this; @@ -154,13 +158,13 @@ public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { + @NotNull public Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { return this.associatedAnatomy(anatomicalSystem.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { + @NotNull public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setSuperficialAnatomy(superficialAnatomy); return this; @@ -168,264 +172,264 @@ public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy) { + @NotNull public Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy) { return this.associatedAnatomy(superficialAnatomy.build()); } /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause medicalCause) { + @NotNull public Builder cause(MedicalCause medicalCause) { this.cause = medicalCause; return this; } /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause.Builder medicalCause) { + @NotNull public Builder cause(MedicalCause.Builder medicalCause) { return this.cause(medicalCause.build()); } /** * One of a set of differential diagnoses for the condition. Specifically, a closely-related or competing diagnosis typically considered later in the cognitive process whereby this medical condition is distinguished from others most likely responsible for a similar collection of signs and symptoms to reach the most parsimonious diagnosis or diagnoses in a patient. */ - public Builder differentialDiagnosis(DDxElement dDxElement) { + @NotNull public Builder differentialDiagnosis(DDxElement dDxElement) { this.differentialDiagnosis = dDxElement; return this; } /** * One of a set of differential diagnoses for the condition. Specifically, a closely-related or competing diagnosis typically considered later in the cognitive process whereby this medical condition is distinguished from others most likely responsible for a similar collection of signs and symptoms to reach the most parsimonious diagnosis or diagnoses in a patient. */ - public Builder differentialDiagnosis(DDxElement.Builder dDxElement) { + @NotNull public Builder differentialDiagnosis(DDxElement.Builder dDxElement) { return this.differentialDiagnosis(dDxElement.build()); } /** * The characteristics of associated patients, such as age, gender, race etc. */ - public Builder epidemiology(String epidemiology) { + @NotNull public Builder epidemiology(String epidemiology) { this.epidemiology = epidemiology; return this; } /** * The likely outcome in either the short term or long term of the medical condition. */ - public Builder expectedPrognosis(String expectedPrognosis) { + @NotNull public Builder expectedPrognosis(String expectedPrognosis) { this.expectedPrognosis = expectedPrognosis; return this; } /** * The expected progression of the condition if it is not treated and allowed to progress naturally. */ - public Builder naturalProgression(String naturalProgression) { + @NotNull public Builder naturalProgression(String naturalProgression) { this.naturalProgression = naturalProgression; return this; } /** * Changes in the normal mechanical, physical, and biochemical functions that are associated with this activity or condition. */ - public Builder pathophysiology(String pathophysiology) { + @NotNull public Builder pathophysiology(String pathophysiology) { this.pathophysiology = pathophysiology; return this; } /** * A possible unexpected and unfavorable evolution of a medical condition. Complications may include worsening of the signs or symptoms of the disease, extension of the condition to other organ systems, etc. */ - public Builder possibleComplication(String possibleComplication) { + @NotNull public Builder possibleComplication(String possibleComplication) { this.possibleComplication = possibleComplication; return this; } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy medicalTherapy) { this.possibleTreatment = medicalTherapy; return this; } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { return this.possibleTreatment(medicalTherapy.build()); } /** * A preventative therapy used to prevent an initial occurrence of the medical condition, such as vaccination. */ - public Builder primaryPrevention(MedicalTherapy medicalTherapy) { + @NotNull public Builder primaryPrevention(MedicalTherapy medicalTherapy) { this.primaryPrevention = medicalTherapy; return this; } /** * A preventative therapy used to prevent an initial occurrence of the medical condition, such as vaccination. */ - public Builder primaryPrevention(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder primaryPrevention(MedicalTherapy.Builder medicalTherapy) { return this.primaryPrevention(medicalTherapy.build()); } /** * A modifiable or non-modifiable factor that increases the risk of a patient contracting this condition, e.g. age, coexisting condition. */ - public Builder riskFactor(MedicalRiskFactor medicalRiskFactor) { + @NotNull public Builder riskFactor(MedicalRiskFactor medicalRiskFactor) { this.riskFactor = medicalRiskFactor; return this; } /** * A modifiable or non-modifiable factor that increases the risk of a patient contracting this condition, e.g. age, coexisting condition. */ - public Builder riskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { + @NotNull public Builder riskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { return this.riskFactor(medicalRiskFactor.build()); } /** * A preventative therapy used to prevent reoccurrence of the medical condition after an initial episode of the condition. */ - public Builder secondaryPrevention(MedicalTherapy medicalTherapy) { + @NotNull public Builder secondaryPrevention(MedicalTherapy medicalTherapy) { this.secondaryPrevention = medicalTherapy; return this; } /** * A preventative therapy used to prevent reoccurrence of the medical condition after an initial episode of the condition. */ - public Builder secondaryPrevention(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder secondaryPrevention(MedicalTherapy.Builder medicalTherapy) { return this.secondaryPrevention(medicalTherapy.build()); } /** * A sign or symptom of this condition. Signs are objective or physically observable manifestations of the medical condition while symptoms are the subjective experience of the medical condition. */ - public Builder signOrSymptom(MedicalSignOrSymptom medicalSignOrSymptom) { + @NotNull public Builder signOrSymptom(MedicalSignOrSymptom medicalSignOrSymptom) { this.signOrSymptom = medicalSignOrSymptom; return this; } /** * A sign or symptom of this condition. Signs are objective or physically observable manifestations of the medical condition while symptoms are the subjective experience of the medical condition. */ - public Builder signOrSymptom(MedicalSignOrSymptom.Builder medicalSignOrSymptom) { + @NotNull public Builder signOrSymptom(MedicalSignOrSymptom.Builder medicalSignOrSymptom) { return this.signOrSymptom(medicalSignOrSymptom.build()); } /** * The stage of the condition, if applicable. */ - public Builder stage(MedicalConditionStage medicalConditionStage) { + @NotNull public Builder stage(MedicalConditionStage medicalConditionStage) { this.stage = medicalConditionStage; return this; } /** * The stage of the condition, if applicable. */ - public Builder stage(MedicalConditionStage.Builder medicalConditionStage) { + @NotNull public Builder stage(MedicalConditionStage.Builder medicalConditionStage) { return this.stage(medicalConditionStage.build()); } /** * A more specific type of the condition, where applicable, for example 'Type 1 Diabetes', 'Type 2 Diabetes', or 'Gestational Diabetes' for Diabetes. */ - public Builder subtype(String subtype) { + @NotNull public Builder subtype(String subtype) { this.subtype = subtype; return this; } /** * A medical test typically performed given this condition. */ - public Builder typicalTest(MedicalTest medicalTest) { + @NotNull public Builder typicalTest(MedicalTest medicalTest) { this.typicalTest = medicalTest; return this; } /** * A medical test typically performed given this condition. */ - public Builder typicalTest(MedicalTest.Builder medicalTest) { + @NotNull public Builder typicalTest(MedicalTest.Builder medicalTest) { return this.typicalTest(medicalTest.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -459,7 +463,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -494,7 +498,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -527,7 +531,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -535,38 +539,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -606,60 +610,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedAnatomy(AnatomicalStructure anatomicalStructure); - Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); - Builder associatedAnatomy(AnatomicalSystem anatomicalSystem); - Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); - Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy); - Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy); - Builder cause(MedicalCause medicalCause); - Builder cause(MedicalCause.Builder medicalCause); - Builder differentialDiagnosis(DDxElement dDxElement); - Builder differentialDiagnosis(DDxElement.Builder dDxElement); - Builder epidemiology(String epidemiology); - Builder expectedPrognosis(String expectedPrognosis); - Builder naturalProgression(String naturalProgression); - Builder pathophysiology(String pathophysiology); - Builder possibleComplication(String possibleComplication); - Builder possibleTreatment(MedicalTherapy medicalTherapy); - Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); - Builder primaryPrevention(MedicalTherapy medicalTherapy); - Builder primaryPrevention(MedicalTherapy.Builder medicalTherapy); - Builder riskFactor(MedicalRiskFactor medicalRiskFactor); - Builder riskFactor(MedicalRiskFactor.Builder medicalRiskFactor); - Builder secondaryPrevention(MedicalTherapy medicalTherapy); - Builder secondaryPrevention(MedicalTherapy.Builder medicalTherapy); - Builder signOrSymptom(MedicalSignOrSymptom medicalSignOrSymptom); - Builder signOrSymptom(MedicalSignOrSymptom.Builder medicalSignOrSymptom); - Builder stage(MedicalConditionStage medicalConditionStage); - Builder stage(MedicalConditionStage.Builder medicalConditionStage); - Builder subtype(String subtype); - Builder typicalTest(MedicalTest medicalTest); - Builder typicalTest(MedicalTest.Builder medicalTest); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedAnatomy(AnatomicalStructure anatomicalStructure); + @NotNull Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder associatedAnatomy(AnatomicalSystem anatomicalSystem); + @NotNull Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); + @NotNull Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy); + @NotNull Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy); + @NotNull Builder cause(MedicalCause medicalCause); + @NotNull Builder cause(MedicalCause.Builder medicalCause); + @NotNull Builder differentialDiagnosis(DDxElement dDxElement); + @NotNull Builder differentialDiagnosis(DDxElement.Builder dDxElement); + @NotNull Builder epidemiology(String epidemiology); + @NotNull Builder expectedPrognosis(String expectedPrognosis); + @NotNull Builder naturalProgression(String naturalProgression); + @NotNull Builder pathophysiology(String pathophysiology); + @NotNull Builder possibleComplication(String possibleComplication); + @NotNull Builder possibleTreatment(MedicalTherapy medicalTherapy); + @NotNull Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder primaryPrevention(MedicalTherapy medicalTherapy); + @NotNull Builder primaryPrevention(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder riskFactor(MedicalRiskFactor medicalRiskFactor); + @NotNull Builder riskFactor(MedicalRiskFactor.Builder medicalRiskFactor); + @NotNull Builder secondaryPrevention(MedicalTherapy medicalTherapy); + @NotNull Builder secondaryPrevention(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder signOrSymptom(MedicalSignOrSymptom medicalSignOrSymptom); + @NotNull Builder signOrSymptom(MedicalSignOrSymptom.Builder medicalSignOrSymptom); + @NotNull Builder stage(MedicalConditionStage medicalConditionStage); + @NotNull Builder stage(MedicalConditionStage.Builder medicalConditionStage); + @NotNull Builder subtype(String subtype); + @NotNull Builder typicalTest(MedicalTest medicalTest); + @NotNull Builder typicalTest(MedicalTest.Builder medicalTest); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalCondition(AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy associatedAnatomy, MedicalCause cause, DDxElement differentialDiagnosis, String epidemiology, String expectedPrognosis, String naturalProgression, String pathophysiology, String possibleComplication, MedicalTherapy possibleTreatment, MedicalTherapy primaryPrevention, MedicalRiskFactor riskFactor, MedicalTherapy secondaryPrevention, MedicalSignOrSymptom signOrSymptom, MedicalConditionStage stage, String subtype, MedicalTest typicalTest, 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) { diff --git a/src/main/java/org/schema/MedicalConditionStage.java b/src/main/java/org/schema/MedicalConditionStage.java index 62ce7198..f88d5dd4 100644 --- a/src/main/java/org/schema/MedicalConditionStage.java +++ b/src/main/java/org/schema/MedicalConditionStage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A stage of a medical condition, such as 'Stage IIIa'. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -38,7 +42,7 @@ public String getSubStageSuffix() { /** * Builder for {@link MedicalConditionStage} */ - public static final class MedicalConditionStageThingBuilder implements Builder { + static final class MedicalConditionStageThingBuilder implements Builder { /** * Creates new {@link MedicalConditionStage} instance. */ @@ -48,15 +52,15 @@ public MedicalConditionStage build() { /** * The stage represented as a number, e.g. 3. */ - public Builder stageAsNumber(Integer integer) { + @NotNull public Builder stageAsNumber(int stageAsNumber) { if (this.stageAsNumber == null) this.stageAsNumber = new Number(); - this.stageAsNumber.setInteger(integer); + this.stageAsNumber.setInt(stageAsNumber); return this; } /** * The stage represented as a number, e.g. 3. */ - public Builder stageAsNumber(Long stageAsNumber) { + @NotNull public Builder stageAsNumber(long stageAsNumber) { if (this.stageAsNumber == null) this.stageAsNumber = new Number(); this.stageAsNumber.setLong(stageAsNumber); return this; @@ -64,7 +68,7 @@ public Builder stageAsNumber(Long stageAsNumber) { /** * The stage represented as a number, e.g. 3. */ - public Builder stageAsNumber(Float stageAsNumber) { + @NotNull public Builder stageAsNumber(float stageAsNumber) { if (this.stageAsNumber == null) this.stageAsNumber = new Number(); this.stageAsNumber.setFloat(stageAsNumber); return this; @@ -72,7 +76,7 @@ public Builder stageAsNumber(Float stageAsNumber) { /** * The stage represented as a number, e.g. 3. */ - public Builder stageAsNumber(Double stageAsNumber) { + @NotNull public Builder stageAsNumber(double stageAsNumber) { if (this.stageAsNumber == null) this.stageAsNumber = new Number(); this.stageAsNumber.setDouble(stageAsNumber); return this; @@ -80,7 +84,7 @@ public Builder stageAsNumber(Double stageAsNumber) { /** * The stage represented as a number, e.g. 3. */ - public Builder stageAsNumber(String stageAsNumber) { + @NotNull public Builder stageAsNumber(String stageAsNumber) { if (this.stageAsNumber == null) this.stageAsNumber = new Number(); this.stageAsNumber.setString(stageAsNumber); return this; @@ -88,106 +92,106 @@ public Builder stageAsNumber(String stageAsNumber) { /** * The substage, e.g. 'a' for Stage IIIa. */ - public Builder subStageSuffix(String subStageSuffix) { + @NotNull public Builder subStageSuffix(String subStageSuffix) { this.subStageSuffix = subStageSuffix; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -221,7 +225,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -256,7 +260,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -289,7 +293,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -297,38 +301,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -354,36 +358,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder stageAsNumber(Integer integer); - Builder stageAsNumber(Long stageAsNumber); - Builder stageAsNumber(Float stageAsNumber); - Builder stageAsNumber(Double stageAsNumber); - Builder stageAsNumber(String stageAsNumber); - Builder subStageSuffix(String subStageSuffix); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder stageAsNumber(int stageAsNumber); + @NotNull Builder stageAsNumber(long stageAsNumber); + @NotNull Builder stageAsNumber(float stageAsNumber); + @NotNull Builder stageAsNumber(double stageAsNumber); + @NotNull Builder stageAsNumber(String stageAsNumber); + @NotNull Builder subStageSuffix(String subStageSuffix); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalConditionStage(Number stageAsNumber, String subStageSuffix, 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) { diff --git a/src/main/java/org/schema/MedicalContraindication.java b/src/main/java/org/schema/MedicalContraindication.java index 2264b2a7..7ff24eb6 100644 --- a/src/main/java/org/schema/MedicalContraindication.java +++ b/src/main/java/org/schema/MedicalContraindication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A condition or factor that serves as a reason to withhold a certain medical therapy. Contraindications can be absolute (there are no reasonable circumstances for undertaking a course of action) or relative (the patient is at higher risk of complications, but that these risks may be outweighed by other considerations or mitigated by other measures). * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalContraindication extends MedicalEntity { /** * Builder for {@link MedicalContraindication} */ - public static final class MedicalContraindicationThingBuilder implements Builder { + static final class MedicalContraindicationThingBuilder implements Builder { /** * Creates new {@link MedicalContraindication} instance. */ @@ -36,99 +40,99 @@ public MedicalContraindication build() { /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -162,7 +166,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -197,7 +201,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -230,7 +234,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -238,38 +242,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -293,30 +297,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MedicalDevice.java b/src/main/java/org/schema/MedicalDevice.java index 067fbe41..4914343b 100644 --- a/src/main/java/org/schema/MedicalDevice.java +++ b/src/main/java/org/schema/MedicalDevice.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any object used in a medical capacity, such as to diagnose or treat a patient. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -74,7 +78,7 @@ public MedicalEntity getSeriousAdverseOutcome() { /** * Builder for {@link MedicalDevice} */ - public static final class MedicalDeviceThingBuilder implements Builder { + static final class MedicalDeviceThingBuilder implements Builder { /** * Creates new {@link MedicalDevice} instance. */ @@ -84,67 +88,67 @@ public MedicalDevice build() { /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A description of the postoperative procedures, care, and/or followups for this device. */ - public Builder postOp(String postOp) { + @NotNull public Builder postOp(String postOp) { this.postOp = postOp; return this; } /** * A description of the workup, testing, and other preparations required before implanting this device. */ - public Builder preOp(String preOp) { + @NotNull public Builder preOp(String preOp) { this.preOp = preOp; return this; } /** * A description of the procedure involved in setting up, using, and/or installing the device. */ - public Builder procedure(String procedure) { + @NotNull public Builder procedure(String procedure) { this.procedure = procedure; return this; } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setMedicalDevicePurpose(medicalDevicePurpose); return this; @@ -152,13 +156,13 @@ public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { return this.purpose(medicalDevicePurpose.build()); } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing thing) { + @NotNull public Builder purpose(Thing thing) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setThing(thing); return this; @@ -166,118 +170,118 @@ public Builder purpose(Thing thing) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing.Builder thing) { + @NotNull public Builder purpose(Thing.Builder thing) { return this.purpose(thing.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -311,7 +315,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -346,7 +350,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -379,7 +383,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -387,38 +391,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -450,45 +454,45 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder postOp(String postOp); - Builder preOp(String preOp); - Builder procedure(String procedure); - Builder purpose(MedicalDevicePurpose medicalDevicePurpose); - Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); - Builder purpose(Thing thing); - Builder purpose(Thing.Builder thing); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder postOp(String postOp); + @NotNull Builder preOp(String preOp); + @NotNull Builder procedure(String procedure); + @NotNull Builder purpose(MedicalDevicePurpose medicalDevicePurpose); + @NotNull Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); + @NotNull Builder purpose(Thing thing); + @NotNull Builder purpose(Thing.Builder thing); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalDevice(MedicalEntity adverseOutcome, MedicalContraindication contraindication, MedicalIndication indication, String postOp, String preOp, String procedure, MedicalDevicePurposeOrThing purpose, 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) { diff --git a/src/main/java/org/schema/MedicalDevicePurpose.java b/src/main/java/org/schema/MedicalDevicePurpose.java index d0a046c9..52e858e6 100644 --- a/src/main/java/org/schema/MedicalDevicePurpose.java +++ b/src/main/java/org/schema/MedicalDevicePurpose.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Categories of medical devices, organized by the purpose or intended use of the device. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalDevicePurpose extends Enumeration { /** * Builder for {@link MedicalDevicePurpose} */ - public static final class MedicalDevicePurposeThingBuilder implements Builder { + static final class MedicalDevicePurposeThingBuilder implements Builder { /** * Creates new {@link MedicalDevicePurpose} instance. */ @@ -36,7 +40,7 @@ public MedicalDevicePurpose build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalDevicePurpose(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalDevicePurposeOrThing.java b/src/main/java/org/schema/MedicalDevicePurposeOrThing.java index 89618bad..46a7f33a 100644 --- a/src/main/java/org/schema/MedicalDevicePurposeOrThing.java +++ b/src/main/java/org/schema/MedicalDevicePurposeOrThing.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class MedicalDevicePurposeOrThing { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myMedicalDevicePurpose != null) return myMedicalDevicePurpose; if (myThing != null) return myThing; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setMedicalDevicePurpose(MedicalDevicePurpose medicalDevicePurpose) { clear(); myMedicalDevicePurpose = medicalDevicePurpose; } public MedicalDevicePurpose getMedicalDevicePurpose() { return myMedicalDevicePurpose; } - private MedicalDevicePurpose myMedicalDevicePurpose; public void setThing(Thing thing) { clear(); myThing = thing; } public Thing getThing() { return myThing; } + private MedicalDevicePurpose myMedicalDevicePurpose; private Thing myThing; private void clear() { myMedicalDevicePurpose = null; diff --git a/src/main/java/org/schema/MedicalEntity.java b/src/main/java/org/schema/MedicalEntity.java index b681de10..d8e2a62b 100644 --- a/src/main/java/org/schema/MedicalEntity.java +++ b/src/main/java/org/schema/MedicalEntity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The most generic type of entity related to health and the practice of medicine. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -62,7 +66,7 @@ public MedicalStudy getStudy() { /** * Builder for {@link MedicalEntity} */ - public static final class MedicalEntityThingBuilder implements Builder { + static final class MedicalEntityThingBuilder implements Builder { /** * Creates new {@link MedicalEntity} instance. */ @@ -72,99 +76,99 @@ public MedicalEntity build() { /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -198,7 +202,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -233,7 +237,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -266,7 +270,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -274,38 +278,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -329,30 +333,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalEntity(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) { diff --git a/src/main/java/org/schema/MedicalEnumeration.java b/src/main/java/org/schema/MedicalEnumeration.java index 881565b5..8c528a49 100644 --- a/src/main/java/org/schema/MedicalEnumeration.java +++ b/src/main/java/org/schema/MedicalEnumeration.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Enumerations related to health and the practice of medicine. */ @@ -25,7 +29,7 @@ public class MedicalEnumeration extends Enumeration { /** * Builder for {@link MedicalEnumeration} */ - public static final class MedicalEnumerationThingBuilder implements Builder { + static final class MedicalEnumerationThingBuilder implements Builder { /** * Creates new {@link MedicalEnumeration} instance. */ @@ -35,7 +39,7 @@ public MedicalEnumeration build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalEnumeration(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalEvidenceLevel.java b/src/main/java/org/schema/MedicalEvidenceLevel.java index a1fda7c2..64a0a02d 100644 --- a/src/main/java/org/schema/MedicalEvidenceLevel.java +++ b/src/main/java/org/schema/MedicalEvidenceLevel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Level of evidence for a medical guideline. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalEvidenceLevel extends Enumeration { /** * Builder for {@link MedicalEvidenceLevel} */ - public static final class MedicalEvidenceLevelThingBuilder implements Builder { + static final class MedicalEvidenceLevelThingBuilder implements Builder { /** * Creates new {@link MedicalEvidenceLevel} instance. */ @@ -36,7 +40,7 @@ public MedicalEvidenceLevel build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalEvidenceLevel(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalGuideline.java b/src/main/java/org/schema/MedicalGuideline.java index 46dd83ad..d6adf0be 100644 --- a/src/main/java/org/schema/MedicalGuideline.java +++ b/src/main/java/org/schema/MedicalGuideline.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any recommendation made by a standard society (e.g. ACC/AHA) or consensus statement that denotes how to diagnose and treat a particular condition. Note: this type should be used to tag the actual guideline recommendation; if the guideline recommendation occurs in a larger scholarly article, use MedicalScholarlyArticle to tag the overall article, not this type. Note also: the organization making the recommendation should be captured in the recognizingAuthority base property of MedicalEntity. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -38,7 +42,7 @@ public String getEvidenceOrigin() { /** * Date on which this guideline's recommendation was made. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getGuidelineDate() { return myGuidelineDate; } @@ -51,7 +55,7 @@ public MedicalEntity getGuidelineSubject() { /** * Builder for {@link MedicalGuideline} */ - public static final class MedicalGuidelineThingBuilder implements Builder { + static final class MedicalGuidelineThingBuilder implements Builder { /** * Creates new {@link MedicalGuideline} instance. */ @@ -61,139 +65,139 @@ public MedicalGuideline build() { /** * Strength of evidence of the data used to formulate the guideline (enumerated). */ - public Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel) { + @NotNull public Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel) { this.evidenceLevel = medicalEvidenceLevel; return this; } /** * Strength of evidence of the data used to formulate the guideline (enumerated). */ - public Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel) { + @NotNull public Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel) { return this.evidenceLevel(medicalEvidenceLevel.build()); } /** * Source of the data used to formulate the guidance, e.g. RCT, consensus opinion, etc. */ - public Builder evidenceOrigin(String evidenceOrigin) { + @NotNull public Builder evidenceOrigin(String evidenceOrigin) { this.evidenceOrigin = evidenceOrigin; return this; } /** * Date on which this guideline's recommendation was made. */ - public Builder guidelineDate(java.util.Date date) { + @NotNull public Builder guidelineDate(java.util.Date date) { this.guidelineDate = date; return this; } /** * The medical conditions, treatments, etc. that are the subject of the guideline. */ - public Builder guidelineSubject(MedicalEntity medicalEntity) { + @NotNull public Builder guidelineSubject(MedicalEntity medicalEntity) { this.guidelineSubject = medicalEntity; return this; } /** * The medical conditions, treatments, etc. that are the subject of the guideline. */ - public Builder guidelineSubject(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder guidelineSubject(MedicalEntity.Builder medicalEntity) { return this.guidelineSubject(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -227,7 +231,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -303,38 +307,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -362,36 +366,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel); - Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel); - Builder evidenceOrigin(String evidenceOrigin); - Builder guidelineDate(java.util.Date date); - Builder guidelineSubject(MedicalEntity medicalEntity); - Builder guidelineSubject(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel); + @NotNull Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel); + @NotNull Builder evidenceOrigin(String evidenceOrigin); + @NotNull Builder guidelineDate(java.util.Date date); + @NotNull Builder guidelineSubject(MedicalEntity medicalEntity); + @NotNull Builder guidelineSubject(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalGuideline(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) { diff --git a/src/main/java/org/schema/MedicalGuidelineContraindication.java b/src/main/java/org/schema/MedicalGuidelineContraindication.java index cd0ee1ef..f46079d0 100644 --- a/src/main/java/org/schema/MedicalGuidelineContraindication.java +++ b/src/main/java/org/schema/MedicalGuidelineContraindication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A guideline contraindication that designates a process as harmful and where quality of the data supporting the contraindication is sound. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalGuidelineContraindication extends MedicalGuideline { /** * Builder for {@link MedicalGuidelineContraindication} */ - public static final class MedicalGuidelineContraindicationThingBuilder implements Builder { + static final class MedicalGuidelineContraindicationThingBuilder implements Builder { /** * Creates new {@link MedicalGuidelineContraindication} instance. */ @@ -36,139 +40,139 @@ public MedicalGuidelineContraindication build() { /** * Strength of evidence of the data used to formulate the guideline (enumerated). */ - public Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel) { + @NotNull public Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel) { this.evidenceLevel = medicalEvidenceLevel; return this; } /** * Strength of evidence of the data used to formulate the guideline (enumerated). */ - public Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel) { + @NotNull public Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel) { return this.evidenceLevel(medicalEvidenceLevel.build()); } /** * Source of the data used to formulate the guidance, e.g. RCT, consensus opinion, etc. */ - public Builder evidenceOrigin(String evidenceOrigin) { + @NotNull public Builder evidenceOrigin(String evidenceOrigin) { this.evidenceOrigin = evidenceOrigin; return this; } /** * Date on which this guideline's recommendation was made. */ - public Builder guidelineDate(java.util.Date date) { + @NotNull public Builder guidelineDate(java.util.Date date) { this.guidelineDate = date; return this; } /** * The medical conditions, treatments, etc. that are the subject of the guideline. */ - public Builder guidelineSubject(MedicalEntity medicalEntity) { + @NotNull public Builder guidelineSubject(MedicalEntity medicalEntity) { this.guidelineSubject = medicalEntity; return this; } /** * The medical conditions, treatments, etc. that are the subject of the guideline. */ - public Builder guidelineSubject(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder guidelineSubject(MedicalEntity.Builder medicalEntity) { return this.guidelineSubject(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -202,7 +206,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -237,7 +241,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -270,7 +274,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -278,38 +282,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -337,36 +341,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel); - Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel); - Builder evidenceOrigin(String evidenceOrigin); - Builder guidelineDate(java.util.Date date); - Builder guidelineSubject(MedicalEntity medicalEntity); - Builder guidelineSubject(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel); + @NotNull Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel); + @NotNull Builder evidenceOrigin(String evidenceOrigin); + @NotNull Builder guidelineDate(java.util.Date date); + @NotNull Builder guidelineSubject(MedicalEntity medicalEntity); + @NotNull Builder guidelineSubject(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MedicalGuidelineRecommendation.java b/src/main/java/org/schema/MedicalGuidelineRecommendation.java index d2bce547..ed92f480 100644 --- a/src/main/java/org/schema/MedicalGuidelineRecommendation.java +++ b/src/main/java/org/schema/MedicalGuidelineRecommendation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A guideline recommendation that is regarded as efficacious and where quality of the data supporting the recommendation is sound. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public String getRecommendationStrength() { /** * Builder for {@link MedicalGuidelineRecommendation} */ - public static final class MedicalGuidelineRecommendationThingBuilder implements Builder { + static final class MedicalGuidelineRecommendationThingBuilder implements Builder { /** * Creates new {@link MedicalGuidelineRecommendation} instance. */ @@ -42,146 +46,146 @@ public MedicalGuidelineRecommendation build() { /** * Strength of the guideline's recommendation (e.g. 'class I'). */ - public Builder recommendationStrength(String recommendationStrength) { + @NotNull public Builder recommendationStrength(String recommendationStrength) { this.recommendationStrength = recommendationStrength; return this; } /** * Strength of evidence of the data used to formulate the guideline (enumerated). */ - public Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel) { + @NotNull public Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel) { this.evidenceLevel = medicalEvidenceLevel; return this; } /** * Strength of evidence of the data used to formulate the guideline (enumerated). */ - public Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel) { + @NotNull public Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel) { return this.evidenceLevel(medicalEvidenceLevel.build()); } /** * Source of the data used to formulate the guidance, e.g. RCT, consensus opinion, etc. */ - public Builder evidenceOrigin(String evidenceOrigin) { + @NotNull public Builder evidenceOrigin(String evidenceOrigin) { this.evidenceOrigin = evidenceOrigin; return this; } /** * Date on which this guideline's recommendation was made. */ - public Builder guidelineDate(java.util.Date date) { + @NotNull public Builder guidelineDate(java.util.Date date) { this.guidelineDate = date; return this; } /** * The medical conditions, treatments, etc. that are the subject of the guideline. */ - public Builder guidelineSubject(MedicalEntity medicalEntity) { + @NotNull public Builder guidelineSubject(MedicalEntity medicalEntity) { this.guidelineSubject = medicalEntity; return this; } /** * The medical conditions, treatments, etc. that are the subject of the guideline. */ - public Builder guidelineSubject(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder guidelineSubject(MedicalEntity.Builder medicalEntity) { return this.guidelineSubject(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -215,7 +219,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -250,7 +254,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -283,7 +287,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -291,38 +295,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -351,37 +355,37 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder recommendationStrength(String recommendationStrength); - Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel); - Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel); - Builder evidenceOrigin(String evidenceOrigin); - Builder guidelineDate(java.util.Date date); - Builder guidelineSubject(MedicalEntity medicalEntity); - Builder guidelineSubject(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder recommendationStrength(String recommendationStrength); + @NotNull Builder evidenceLevel(MedicalEvidenceLevel medicalEvidenceLevel); + @NotNull Builder evidenceLevel(MedicalEvidenceLevel.Builder medicalEvidenceLevel); + @NotNull Builder evidenceOrigin(String evidenceOrigin); + @NotNull Builder guidelineDate(java.util.Date date); + @NotNull Builder guidelineSubject(MedicalEntity medicalEntity); + @NotNull Builder guidelineSubject(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalGuidelineRecommendation(String recommendationStrength, 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) { diff --git a/src/main/java/org/schema/MedicalImagingTechnique.java b/src/main/java/org/schema/MedicalImagingTechnique.java index 1c14fcf7..19d3fc85 100644 --- a/src/main/java/org/schema/MedicalImagingTechnique.java +++ b/src/main/java/org/schema/MedicalImagingTechnique.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any medical imaging modality typically used for diagnostic purposes. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalImagingTechnique extends Enumeration { /** * Builder for {@link MedicalImagingTechnique} */ - public static final class MedicalImagingTechniqueThingBuilder implements Builder { + static final class MedicalImagingTechniqueThingBuilder implements Builder { /** * Creates new {@link MedicalImagingTechnique} instance. */ @@ -36,7 +40,7 @@ public MedicalImagingTechnique build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalImagingTechnique(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalIndication.java b/src/main/java/org/schema/MedicalIndication.java index 5c4c14ac..c26de031 100644 --- a/src/main/java/org/schema/MedicalIndication.java +++ b/src/main/java/org/schema/MedicalIndication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A condition or factor that indicates use of a medical therapy, including signs, symptoms, risk factors, anatomical states, etc. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalIndication extends MedicalEntity { /** * Builder for {@link MedicalIndication} */ - public static final class MedicalIndicationThingBuilder implements Builder { + static final class MedicalIndicationThingBuilder implements Builder { /** * Creates new {@link MedicalIndication} instance. */ @@ -36,99 +40,99 @@ public MedicalIndication build() { /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -162,7 +166,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -197,7 +201,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -230,7 +234,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -238,38 +242,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -293,30 +297,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MedicalIntangible.java b/src/main/java/org/schema/MedicalIntangible.java index bc82bb35..683d18ee 100644 --- a/src/main/java/org/schema/MedicalIntangible.java +++ b/src/main/java/org/schema/MedicalIntangible.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A utility class that serves as the umbrella for a number of 'intangible' things in the medical space. */ @@ -25,7 +29,7 @@ public class MedicalIntangible extends MedicalEntity { /** * Builder for {@link MedicalIntangible} */ - public static final class MedicalIntangibleThingBuilder implements Builder { + static final class MedicalIntangibleThingBuilder implements Builder { /** * Creates new {@link MedicalIntangible} instance. */ @@ -35,99 +39,99 @@ public MedicalIntangible build() { /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -161,7 +165,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -196,7 +200,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -229,7 +233,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -237,38 +241,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -292,30 +296,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MedicalObservationalStudy.java b/src/main/java/org/schema/MedicalObservationalStudy.java index 57d07e2f..880e8336 100644 --- a/src/main/java/org/schema/MedicalObservationalStudy.java +++ b/src/main/java/org/schema/MedicalObservationalStudy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An observational study is a type of medical study that attempts to infer the possible effect of a treatment through observation of a cohort of subjects over a period of time. In an observational study, the assignment of subjects into treatment groups versus control groups is outside the control of the investigator. This is in contrast with controlled studies, such as the randomized controlled trials represented by MedicalTrial, where each subject is randomly assigned to a treatment group or a control group before the start of the treatment. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public MedicalObservationalStudyDesign getStudyDesign() { /** * Builder for {@link MedicalObservationalStudy} */ - public static final class MedicalObservationalStudyThingBuilder implements Builder { + static final class MedicalObservationalStudyThingBuilder implements Builder { /** * Creates new {@link MedicalObservationalStudy} instance. */ @@ -42,178 +46,178 @@ public MedicalObservationalStudy build() { /** * Specifics about the observational study design (enumerated). */ - public Builder studyDesign(MedicalObservationalStudyDesign medicalObservationalStudyDesign) { + @NotNull public Builder studyDesign(MedicalObservationalStudyDesign medicalObservationalStudyDesign) { this.studyDesign = medicalObservationalStudyDesign; return this; } /** * Specifics about the observational study design (enumerated). */ - public Builder studyDesign(MedicalObservationalStudyDesign.Builder medicalObservationalStudyDesign) { + @NotNull public Builder studyDesign(MedicalObservationalStudyDesign.Builder medicalObservationalStudyDesign) { return this.studyDesign(medicalObservationalStudyDesign.build()); } /** * Expected or actual outcomes of the study. */ - public Builder outcome(String outcome) { + @NotNull public Builder outcome(String outcome) { this.outcome = outcome; return this; } /** * Any characteristics of the population used in the study, e.g. 'males under 65'. */ - public Builder population(String population) { + @NotNull public Builder population(String population) { this.population = population; return this; } /** * Sponsor of the study. */ - public Builder sponsor(Organization organization) { + @NotNull public Builder sponsor(Organization organization) { this.sponsor = organization; return this; } /** * Sponsor of the study. */ - public Builder sponsor(Organization.Builder organization) { + @NotNull public Builder sponsor(Organization.Builder organization) { return this.sponsor(organization.build()); } /** * The status of the study (enumerated). */ - public Builder status(MedicalStudyStatus medicalStudyStatus) { + @NotNull public Builder status(MedicalStudyStatus medicalStudyStatus) { this.status = medicalStudyStatus; return this; } /** * The status of the study (enumerated). */ - public Builder status(MedicalStudyStatus.Builder medicalStudyStatus) { + @NotNull public Builder status(MedicalStudyStatus.Builder medicalStudyStatus) { return this.status(medicalStudyStatus.build()); } /** * The location in which the study is taking/took place. */ - public Builder studyLocation(AdministrativeArea administrativeArea) { + @NotNull public Builder studyLocation(AdministrativeArea administrativeArea) { this.studyLocation = administrativeArea; return this; } /** * The location in which the study is taking/took place. */ - public Builder studyLocation(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder studyLocation(AdministrativeArea.Builder administrativeArea) { return this.studyLocation(administrativeArea.build()); } /** * A subject of the study, i.e. one of the medical conditions, therapies, devices, drugs, etc. investigated by the study. */ - public Builder studySubject(MedicalEntity medicalEntity) { + @NotNull public Builder studySubject(MedicalEntity medicalEntity) { this.studySubject = medicalEntity; return this; } /** * A subject of the study, i.e. one of the medical conditions, therapies, devices, drugs, etc. investigated by the study. */ - public Builder studySubject(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder studySubject(MedicalEntity.Builder medicalEntity) { return this.studySubject(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -247,7 +251,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -282,7 +286,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -315,7 +319,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -323,38 +327,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -385,42 +389,42 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder studyDesign(MedicalObservationalStudyDesign medicalObservationalStudyDesign); - Builder studyDesign(MedicalObservationalStudyDesign.Builder medicalObservationalStudyDesign); - Builder outcome(String outcome); - Builder population(String population); - Builder sponsor(Organization organization); - Builder sponsor(Organization.Builder organization); - Builder status(MedicalStudyStatus medicalStudyStatus); - Builder status(MedicalStudyStatus.Builder medicalStudyStatus); - Builder studyLocation(AdministrativeArea administrativeArea); - Builder studyLocation(AdministrativeArea.Builder administrativeArea); - Builder studySubject(MedicalEntity medicalEntity); - Builder studySubject(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder studyDesign(MedicalObservationalStudyDesign medicalObservationalStudyDesign); + @NotNull Builder studyDesign(MedicalObservationalStudyDesign.Builder medicalObservationalStudyDesign); + @NotNull Builder outcome(String outcome); + @NotNull Builder population(String population); + @NotNull Builder sponsor(Organization organization); + @NotNull Builder sponsor(Organization.Builder organization); + @NotNull Builder status(MedicalStudyStatus medicalStudyStatus); + @NotNull Builder status(MedicalStudyStatus.Builder medicalStudyStatus); + @NotNull Builder studyLocation(AdministrativeArea administrativeArea); + @NotNull Builder studyLocation(AdministrativeArea.Builder administrativeArea); + @NotNull Builder studySubject(MedicalEntity medicalEntity); + @NotNull Builder studySubject(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalObservationalStudy(MedicalObservationalStudyDesign studyDesign, String outcome, String population, Organization sponsor, MedicalStudyStatus status, AdministrativeArea studyLocation, MedicalEntity studySubject, 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) { diff --git a/src/main/java/org/schema/MedicalObservationalStudyDesign.java b/src/main/java/org/schema/MedicalObservationalStudyDesign.java index ef66be60..4018d075 100644 --- a/src/main/java/org/schema/MedicalObservationalStudyDesign.java +++ b/src/main/java/org/schema/MedicalObservationalStudyDesign.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Design models for observational medical studies. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalObservationalStudyDesign extends Enumeration { /** * Builder for {@link MedicalObservationalStudyDesign} */ - public static final class MedicalObservationalStudyDesignThingBuilder implements Builder { + static final class MedicalObservationalStudyDesignThingBuilder implements Builder { /** * Creates new {@link MedicalObservationalStudyDesign} instance. */ @@ -36,7 +40,7 @@ public MedicalObservationalStudyDesign build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalObservationalStudyDesign(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalOrganization.java b/src/main/java/org/schema/MedicalOrganization.java index dc36960b..5be9c20d 100644 --- a/src/main/java/org/schema/MedicalOrganization.java +++ b/src/main/java/org/schema/MedicalOrganization.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical organization, such as a doctor's office or clinic. */ @@ -25,7 +29,7 @@ public class MedicalOrganization extends LocalBusiness { /** * Builder for {@link MedicalOrganization} */ - public static final class MedicalOrganizationThingBuilder implements Builder { + static final class MedicalOrganizationThingBuilder implements Builder { /** * Creates new {@link MedicalOrganization} instance. */ @@ -35,107 +39,107 @@ public MedicalOrganization build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MedicalProcedure.java b/src/main/java/org/schema/MedicalProcedure.java index 77192715..8d853dfa 100644 --- a/src/main/java/org/schema/MedicalProcedure.java +++ b/src/main/java/org/schema/MedicalProcedure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A process of care used in either a diagnostic, therapeutic, or palliative capacity that relies on invasive (surgical), non-invasive, or percutaneous techniques. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -50,7 +54,7 @@ public MedicalProcedureType getProcedureType() { /** * Builder for {@link MedicalProcedure} */ - public static final class MedicalProcedureThingBuilder implements Builder { + static final class MedicalProcedureThingBuilder implements Builder { /** * Creates new {@link MedicalProcedure} instance. */ @@ -60,133 +64,133 @@ public MedicalProcedure build() { /** * Typical or recommended followup care after the procedure is performed. */ - public Builder followup(String followup) { + @NotNull public Builder followup(String followup) { this.followup = followup; return this; } /** * How the procedure is performed. */ - public Builder howPerformed(String howPerformed) { + @NotNull public Builder howPerformed(String howPerformed) { this.howPerformed = howPerformed; return this; } /** * Typical preparation that a patient must undergo before having the procedure performed. */ - public Builder preparation(String preparation) { + @NotNull public Builder preparation(String preparation) { this.preparation = preparation; return this; } /** * The type of procedure, for example Surgical, Noninvasive, or Percutaneous. */ - public Builder procedureType(MedicalProcedureType medicalProcedureType) { + @NotNull public Builder procedureType(MedicalProcedureType medicalProcedureType) { this.procedureType = medicalProcedureType; return this; } /** * The type of procedure, for example Surgical, Noninvasive, or Percutaneous. */ - public Builder procedureType(MedicalProcedureType.Builder medicalProcedureType) { + @NotNull public Builder procedureType(MedicalProcedureType.Builder medicalProcedureType) { return this.procedureType(medicalProcedureType.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -220,7 +224,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -288,7 +292,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -296,38 +300,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -355,35 +359,35 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder followup(String followup); - Builder howPerformed(String howPerformed); - Builder preparation(String preparation); - Builder procedureType(MedicalProcedureType medicalProcedureType); - Builder procedureType(MedicalProcedureType.Builder medicalProcedureType); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder followup(String followup); + @NotNull Builder howPerformed(String howPerformed); + @NotNull Builder preparation(String preparation); + @NotNull Builder procedureType(MedicalProcedureType medicalProcedureType); + @NotNull Builder procedureType(MedicalProcedureType.Builder medicalProcedureType); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalProcedure(String followup, String howPerformed, String preparation, MedicalProcedureType procedureType, 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) { diff --git a/src/main/java/org/schema/MedicalProcedureOrMedicalTestOrMedicalTherapy.java b/src/main/java/org/schema/MedicalProcedureOrMedicalTestOrMedicalTherapy.java index fb75c37c..c3fc8d22 100644 --- a/src/main/java/org/schema/MedicalProcedureOrMedicalTestOrMedicalTherapy.java +++ b/src/main/java/org/schema/MedicalProcedureOrMedicalTestOrMedicalTherapy.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class MedicalProcedureOrMedicalTestOrMedicalTherapy { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myMedicalProcedure != null) return myMedicalProcedure; if (myMedicalTest != null) return myMedicalTest; @@ -35,12 +38,12 @@ public Thing getThing() { } public void setMedicalProcedure(MedicalProcedure medicalProcedure) { clear(); myMedicalProcedure = medicalProcedure; } public MedicalProcedure getMedicalProcedure() { return myMedicalProcedure; } - private MedicalProcedure myMedicalProcedure; public void setMedicalTest(MedicalTest medicalTest) { clear(); myMedicalTest = medicalTest; } public MedicalTest getMedicalTest() { return myMedicalTest; } - private MedicalTest myMedicalTest; public void setMedicalTherapy(MedicalTherapy medicalTherapy) { clear(); myMedicalTherapy = medicalTherapy; } public MedicalTherapy getMedicalTherapy() { return myMedicalTherapy; } + private MedicalProcedure myMedicalProcedure; + private MedicalTest myMedicalTest; private MedicalTherapy myMedicalTherapy; private void clear() { myMedicalProcedure = null; diff --git a/src/main/java/org/schema/MedicalProcedureType.java b/src/main/java/org/schema/MedicalProcedureType.java index bb421b52..5b475c44 100644 --- a/src/main/java/org/schema/MedicalProcedureType.java +++ b/src/main/java/org/schema/MedicalProcedureType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An enumeration that describes different types of medical procedures. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalProcedureType extends Enumeration { /** * Builder for {@link MedicalProcedureType} */ - public static final class MedicalProcedureTypeThingBuilder implements Builder { + static final class MedicalProcedureTypeThingBuilder implements Builder { /** * Creates new {@link MedicalProcedureType} instance. */ @@ -36,7 +40,7 @@ public MedicalProcedureType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalProcedureType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalResearcher.java b/src/main/java/org/schema/MedicalResearcher.java index 7c4bb84f..c00db58a 100644 --- a/src/main/java/org/schema/MedicalResearcher.java +++ b/src/main/java/org/schema/MedicalResearcher.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Medical researchers. */ @@ -25,7 +29,7 @@ public class MedicalResearcher { /** * Builder for {@link MedicalResearcher} */ - public static final class MedicalResearcherThingBuilder implements Builder { + static final class MedicalResearcherThingBuilder implements Builder { /** * Creates new {@link MedicalResearcher} instance. */ @@ -34,7 +38,7 @@ public MedicalResearcher build() { } } public interface Builder extends ThingBuilder { - + } protected MedicalResearcher() { diff --git a/src/main/java/org/schema/MedicalRiskCalculator.java b/src/main/java/org/schema/MedicalRiskCalculator.java index 6ab9abf0..dcc693de 100644 --- a/src/main/java/org/schema/MedicalRiskCalculator.java +++ b/src/main/java/org/schema/MedicalRiskCalculator.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A complex mathematical calculation requiring an online calculator, used to assess prognosis. Note: use the url property of Thing to record any URLs for online calculators. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalRiskCalculator extends MedicalRiskEstimator { /** * Builder for {@link MedicalRiskCalculator} */ - public static final class MedicalRiskCalculatorThingBuilder implements Builder { + static final class MedicalRiskCalculatorThingBuilder implements Builder { /** * Creates new {@link MedicalRiskCalculator} instance. */ @@ -36,125 +40,125 @@ public MedicalRiskCalculator build() { /** * The condition, complication, or symptom whose risk is being estimated. */ - public Builder estimatesRiskOf(MedicalEntity medicalEntity) { + @NotNull public Builder estimatesRiskOf(MedicalEntity medicalEntity) { this.estimatesRiskOf = medicalEntity; return this; } /** * The condition, complication, or symptom whose risk is being estimated. */ - public Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity) { return this.estimatesRiskOf(medicalEntity.build()); } /** * A modifiable or non-modifiable risk factor included in the calculation, e.g. age, coexisting condition. */ - public Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor) { + @NotNull public Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor) { this.includedRiskFactor = medicalRiskFactor; return this; } /** * A modifiable or non-modifiable risk factor included in the calculation, e.g. age, coexisting condition. */ - public Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { + @NotNull public Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { return this.includedRiskFactor(medicalRiskFactor.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -188,7 +192,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -223,7 +227,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -256,7 +260,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -264,38 +268,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -321,34 +325,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder estimatesRiskOf(MedicalEntity medicalEntity); - Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity); - Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor); - Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder estimatesRiskOf(MedicalEntity medicalEntity); + @NotNull Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity); + @NotNull Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor); + @NotNull Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MedicalRiskEstimator.java b/src/main/java/org/schema/MedicalRiskEstimator.java index 130ad1c3..49bda38f 100644 --- a/src/main/java/org/schema/MedicalRiskEstimator.java +++ b/src/main/java/org/schema/MedicalRiskEstimator.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any rule set or interactive tool for estimating the risk of developing a complication or condition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -38,7 +42,7 @@ public MedicalRiskFactor getIncludedRiskFactor() { /** * Builder for {@link MedicalRiskEstimator} */ - public static final class MedicalRiskEstimatorThingBuilder implements Builder { + static final class MedicalRiskEstimatorThingBuilder implements Builder { /** * Creates new {@link MedicalRiskEstimator} instance. */ @@ -48,125 +52,125 @@ public MedicalRiskEstimator build() { /** * The condition, complication, or symptom whose risk is being estimated. */ - public Builder estimatesRiskOf(MedicalEntity medicalEntity) { + @NotNull public Builder estimatesRiskOf(MedicalEntity medicalEntity) { this.estimatesRiskOf = medicalEntity; return this; } /** * The condition, complication, or symptom whose risk is being estimated. */ - public Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity) { return this.estimatesRiskOf(medicalEntity.build()); } /** * A modifiable or non-modifiable risk factor included in the calculation, e.g. age, coexisting condition. */ - public Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor) { + @NotNull public Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor) { this.includedRiskFactor = medicalRiskFactor; return this; } /** * A modifiable or non-modifiable risk factor included in the calculation, e.g. age, coexisting condition. */ - public Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { + @NotNull public Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { return this.includedRiskFactor(medicalRiskFactor.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -200,7 +204,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -235,7 +239,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -268,7 +272,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -276,38 +280,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -333,34 +337,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder estimatesRiskOf(MedicalEntity medicalEntity); - Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity); - Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor); - Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder estimatesRiskOf(MedicalEntity medicalEntity); + @NotNull Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity); + @NotNull Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor); + @NotNull Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalRiskEstimator(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) { diff --git a/src/main/java/org/schema/MedicalRiskFactor.java b/src/main/java/org/schema/MedicalRiskFactor.java index 7a94af32..e09926b3 100644 --- a/src/main/java/org/schema/MedicalRiskFactor.java +++ b/src/main/java/org/schema/MedicalRiskFactor.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A risk factor is anything that increases a person's likelihood of developing or contracting a disease, medical condition, or complication. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public MedicalEntity getIncreasesRiskOf() { /** * Builder for {@link MedicalRiskFactor} */ - public static final class MedicalRiskFactorThingBuilder implements Builder { + static final class MedicalRiskFactorThingBuilder implements Builder { /** * Creates new {@link MedicalRiskFactor} instance. */ @@ -42,112 +46,112 @@ public MedicalRiskFactor build() { /** * The condition, complication, etc. influenced by this factor. */ - public Builder increasesRiskOf(MedicalEntity medicalEntity) { + @NotNull public Builder increasesRiskOf(MedicalEntity medicalEntity) { this.increasesRiskOf = medicalEntity; return this; } /** * The condition, complication, etc. influenced by this factor. */ - public Builder increasesRiskOf(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder increasesRiskOf(MedicalEntity.Builder medicalEntity) { return this.increasesRiskOf(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder increasesRiskOf(MedicalEntity medicalEntity); - Builder increasesRiskOf(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder increasesRiskOf(MedicalEntity medicalEntity); + @NotNull Builder increasesRiskOf(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalRiskFactor(MedicalEntity increasesRiskOf, 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) { diff --git a/src/main/java/org/schema/MedicalRiskScore.java b/src/main/java/org/schema/MedicalRiskScore.java index 20dec16b..9dc70c70 100644 --- a/src/main/java/org/schema/MedicalRiskScore.java +++ b/src/main/java/org/schema/MedicalRiskScore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A simple system that adds up the number of risk factors to yield a score that is associated with prognosis, e.g. CHAD score, TIMI risk score. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public String getAlgorithm() { /** * Builder for {@link MedicalRiskScore} */ - public static final class MedicalRiskScoreThingBuilder implements Builder { + static final class MedicalRiskScoreThingBuilder implements Builder { /** * Creates new {@link MedicalRiskScore} instance. */ @@ -42,132 +46,132 @@ public MedicalRiskScore build() { /** * The algorithm or rules to follow to compute the score. */ - public Builder algorithm(String algorithm) { + @NotNull public Builder algorithm(String algorithm) { this.algorithm = algorithm; return this; } /** * The condition, complication, or symptom whose risk is being estimated. */ - public Builder estimatesRiskOf(MedicalEntity medicalEntity) { + @NotNull public Builder estimatesRiskOf(MedicalEntity medicalEntity) { this.estimatesRiskOf = medicalEntity; return this; } /** * The condition, complication, or symptom whose risk is being estimated. */ - public Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity) { return this.estimatesRiskOf(medicalEntity.build()); } /** * A modifiable or non-modifiable risk factor included in the calculation, e.g. age, coexisting condition. */ - public Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor) { + @NotNull public Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor) { this.includedRiskFactor = medicalRiskFactor; return this; } /** * A modifiable or non-modifiable risk factor included in the calculation, e.g. age, coexisting condition. */ - public Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { + @NotNull public Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor) { return this.includedRiskFactor(medicalRiskFactor.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -201,7 +205,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -269,7 +273,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -277,38 +281,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -335,35 +339,35 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder algorithm(String algorithm); - Builder estimatesRiskOf(MedicalEntity medicalEntity); - Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity); - Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor); - Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder algorithm(String algorithm); + @NotNull Builder estimatesRiskOf(MedicalEntity medicalEntity); + @NotNull Builder estimatesRiskOf(MedicalEntity.Builder medicalEntity); + @NotNull Builder includedRiskFactor(MedicalRiskFactor medicalRiskFactor); + @NotNull Builder includedRiskFactor(MedicalRiskFactor.Builder medicalRiskFactor); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalRiskScore(String algorithm, 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) { diff --git a/src/main/java/org/schema/MedicalScholarlyArticle.java b/src/main/java/org/schema/MedicalScholarlyArticle.java index 4b2a386c..1becbe5b 100644 --- a/src/main/java/org/schema/MedicalScholarlyArticle.java +++ b/src/main/java/org/schema/MedicalScholarlyArticle.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A scholarly article in the medical domain. */ @@ -31,7 +35,7 @@ public String getPublicationType() { /** * Builder for {@link MedicalScholarlyArticle} */ - public static final class MedicalScholarlyArticleThingBuilder implements Builder { + static final class MedicalScholarlyArticleThingBuilder implements Builder { /** * Creates new {@link MedicalScholarlyArticle} instance. */ @@ -41,194 +45,194 @@ public MedicalScholarlyArticle build() { /** * The type of the medical article, taken from the US NLM MeSH publication type catalog. */ - public Builder publicationType(String publicationType) { + @NotNull public Builder publicationType(String publicationType) { this.publicationType = publicationType; return this; } /** * The actual body of the article. */ - public Builder articleBody(String articleBody) { + @NotNull public Builder articleBody(String articleBody) { this.articleBody = articleBody; return this; } /** * Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. */ - public Builder articleSection(String articleSection) { + @NotNull public Builder articleSection(String articleSection) { this.articleSection = articleSection; return this; } /** * The number of words in the text of the Article. */ - public Builder wordCount(Integer integer) { - this.wordCount = integer; + @NotNull public Builder wordCount(int wordCount) { + this.wordCount = wordCount; return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -236,13 +240,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -250,20 +254,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -271,13 +275,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -285,40 +289,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -326,13 +330,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -340,13 +344,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -354,13 +358,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -368,21 +372,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -390,7 +394,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -398,7 +402,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -406,7 +410,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -414,7 +418,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -422,13 +426,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -436,101 +440,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -538,13 +542,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -552,35 +556,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -588,13 +592,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -602,53 +606,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -656,13 +660,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -670,127 +674,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -798,7 +802,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -806,7 +810,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -814,7 +818,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -822,20 +826,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -843,13 +847,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -857,66 +861,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -924,13 +928,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -938,40 +942,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1005,7 +1009,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1040,7 +1044,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1073,7 +1077,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1081,38 +1085,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1122,9 +1126,9 @@ public Builder id(long id) { private String publicationType; private String articleBody; private String articleSection; - private Integer wordCount; - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private int wordCount; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; private String schemaVersion; private Thing about; @@ -1182,7 +1186,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1200,153 +1204,153 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder publicationType(String publicationType); - Builder articleBody(String articleBody); - Builder articleSection(String articleSection); - Builder wordCount(Integer integer); - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder publicationType(String publicationType); + @NotNull Builder articleBody(String articleBody); + @NotNull Builder articleSection(String articleSection); + @NotNull Builder wordCount(int wordCount); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MedicalScholarlyArticle(String publicationType, 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) { + protected MedicalScholarlyArticle(String publicationType, String articleBody, String articleSection, int wordCount, StringOrInt pageEnd, StringOrInt 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, int 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); myPublicationType = publicationType; } diff --git a/src/main/java/org/schema/MedicalSign.java b/src/main/java/org/schema/MedicalSign.java index 695794c2..332ac53a 100644 --- a/src/main/java/org/schema/MedicalSign.java +++ b/src/main/java/org/schema/MedicalSign.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any physical manifestation of a person's medical condition discoverable by objective diagnostic tests or physical examination. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -38,7 +42,7 @@ public MedicalTest getIdentifyingTest() { /** * Builder for {@link MedicalSign} */ - public static final class MedicalSignThingBuilder implements Builder { + static final class MedicalSignThingBuilder implements Builder { /** * Creates new {@link MedicalSign} instance. */ @@ -48,151 +52,151 @@ public MedicalSign build() { /** * A physical examination that can identify this sign. */ - public Builder identifyingExam(PhysicalExam physicalExam) { + @NotNull public Builder identifyingExam(PhysicalExam physicalExam) { this.identifyingExam = physicalExam; return this; } /** * A physical examination that can identify this sign. */ - public Builder identifyingExam(PhysicalExam.Builder physicalExam) { + @NotNull public Builder identifyingExam(PhysicalExam.Builder physicalExam) { return this.identifyingExam(physicalExam.build()); } /** * A diagnostic test that can identify this sign. */ - public Builder identifyingTest(MedicalTest medicalTest) { + @NotNull public Builder identifyingTest(MedicalTest medicalTest) { this.identifyingTest = medicalTest; return this; } /** * A diagnostic test that can identify this sign. */ - public Builder identifyingTest(MedicalTest.Builder medicalTest) { + @NotNull public Builder identifyingTest(MedicalTest.Builder medicalTest) { return this.identifyingTest(medicalTest.build()); } /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause medicalCause) { + @NotNull public Builder cause(MedicalCause medicalCause) { this.cause = medicalCause; return this; } /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause.Builder medicalCause) { + @NotNull public Builder cause(MedicalCause.Builder medicalCause) { return this.cause(medicalCause.build()); } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy medicalTherapy) { this.possibleTreatment = medicalTherapy; return this; } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { return this.possibleTreatment(medicalTherapy.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -226,7 +230,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -261,7 +265,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -294,7 +298,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -302,38 +306,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -361,38 +365,38 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder identifyingExam(PhysicalExam physicalExam); - Builder identifyingExam(PhysicalExam.Builder physicalExam); - Builder identifyingTest(MedicalTest medicalTest); - Builder identifyingTest(MedicalTest.Builder medicalTest); - Builder cause(MedicalCause medicalCause); - Builder cause(MedicalCause.Builder medicalCause); - Builder possibleTreatment(MedicalTherapy medicalTherapy); - Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder identifyingExam(PhysicalExam physicalExam); + @NotNull Builder identifyingExam(PhysicalExam.Builder physicalExam); + @NotNull Builder identifyingTest(MedicalTest medicalTest); + @NotNull Builder identifyingTest(MedicalTest.Builder medicalTest); + @NotNull Builder cause(MedicalCause medicalCause); + @NotNull Builder cause(MedicalCause.Builder medicalCause); + @NotNull Builder possibleTreatment(MedicalTherapy medicalTherapy); + @NotNull Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalSign(PhysicalExam identifyingExam, MedicalTest identifyingTest, 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) { diff --git a/src/main/java/org/schema/MedicalSignOrSymptom.java b/src/main/java/org/schema/MedicalSignOrSymptom.java index 12c8f9e5..2969f232 100644 --- a/src/main/java/org/schema/MedicalSignOrSymptom.java +++ b/src/main/java/org/schema/MedicalSignOrSymptom.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any indication of the existence of a medical condition or disease. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -38,7 +42,7 @@ public MedicalTherapy getPossibleTreatment() { /** * Builder for {@link MedicalSignOrSymptom} */ - public static final class MedicalSignOrSymptomThingBuilder implements Builder { + static final class MedicalSignOrSymptomThingBuilder implements Builder { /** * Creates new {@link MedicalSignOrSymptom} instance. */ @@ -48,125 +52,125 @@ public MedicalSignOrSymptom build() { /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause medicalCause) { + @NotNull public Builder cause(MedicalCause medicalCause) { this.cause = medicalCause; return this; } /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause.Builder medicalCause) { + @NotNull public Builder cause(MedicalCause.Builder medicalCause) { return this.cause(medicalCause.build()); } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy medicalTherapy) { this.possibleTreatment = medicalTherapy; return this; } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { return this.possibleTreatment(medicalTherapy.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -200,7 +204,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -235,7 +239,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -268,7 +272,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -276,38 +280,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -333,34 +337,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder cause(MedicalCause medicalCause); - Builder cause(MedicalCause.Builder medicalCause); - Builder possibleTreatment(MedicalTherapy medicalTherapy); - Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder cause(MedicalCause medicalCause); + @NotNull Builder cause(MedicalCause.Builder medicalCause); + @NotNull Builder possibleTreatment(MedicalTherapy medicalTherapy); + @NotNull Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalSignOrSymptom(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) { diff --git a/src/main/java/org/schema/MedicalSpecialty.java b/src/main/java/org/schema/MedicalSpecialty.java index d6bc3037..e81d0e75 100644 --- a/src/main/java/org/schema/MedicalSpecialty.java +++ b/src/main/java/org/schema/MedicalSpecialty.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any specific branch of medical science or practice. Medical specialities include clinical specialties that pertain to particular organ systems and their respective disease states, as well as allied health specialties. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalSpecialty extends Specialty { /** * Builder for {@link MedicalSpecialty} */ - public static final class MedicalSpecialtyThingBuilder implements Builder { + static final class MedicalSpecialtyThingBuilder implements Builder { /** * Creates new {@link MedicalSpecialty} instance. */ @@ -36,7 +40,7 @@ public MedicalSpecialty build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalSpecialty(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalStudy.java b/src/main/java/org/schema/MedicalStudy.java index 22b7814b..4ae02842 100644 --- a/src/main/java/org/schema/MedicalStudy.java +++ b/src/main/java/org/schema/MedicalStudy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical study is an umbrella type covering all kinds of research studies relating to human medicine or health, including observational studies and interventional trials and registries, randomized, controlled or not. When the specific type of study is known, use one of the extensions of this type, such as MedicalTrial or MedicalObservationalStudy. Also, note that this type should be used to mark up data that describes the study itself; to tag an article that publishes the results of a study, use MedicalScholarlyArticle. Note: use the code property of MedicalEntity to store study IDs, e.g. clinicaltrials.gov ID. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -62,7 +66,7 @@ public MedicalEntity getStudySubject() { /** * Builder for {@link MedicalStudy} */ - public static final class MedicalStudyThingBuilder implements Builder { + static final class MedicalStudyThingBuilder implements Builder { /** * Creates new {@link MedicalStudy} instance. */ @@ -72,165 +76,165 @@ public MedicalStudy build() { /** * Expected or actual outcomes of the study. */ - public Builder outcome(String outcome) { + @NotNull public Builder outcome(String outcome) { this.outcome = outcome; return this; } /** * Any characteristics of the population used in the study, e.g. 'males under 65'. */ - public Builder population(String population) { + @NotNull public Builder population(String population) { this.population = population; return this; } /** * Sponsor of the study. */ - public Builder sponsor(Organization organization) { + @NotNull public Builder sponsor(Organization organization) { this.sponsor = organization; return this; } /** * Sponsor of the study. */ - public Builder sponsor(Organization.Builder organization) { + @NotNull public Builder sponsor(Organization.Builder organization) { return this.sponsor(organization.build()); } /** * The status of the study (enumerated). */ - public Builder status(MedicalStudyStatus medicalStudyStatus) { + @NotNull public Builder status(MedicalStudyStatus medicalStudyStatus) { this.status = medicalStudyStatus; return this; } /** * The status of the study (enumerated). */ - public Builder status(MedicalStudyStatus.Builder medicalStudyStatus) { + @NotNull public Builder status(MedicalStudyStatus.Builder medicalStudyStatus) { return this.status(medicalStudyStatus.build()); } /** * The location in which the study is taking/took place. */ - public Builder studyLocation(AdministrativeArea administrativeArea) { + @NotNull public Builder studyLocation(AdministrativeArea administrativeArea) { this.studyLocation = administrativeArea; return this; } /** * The location in which the study is taking/took place. */ - public Builder studyLocation(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder studyLocation(AdministrativeArea.Builder administrativeArea) { return this.studyLocation(administrativeArea.build()); } /** * A subject of the study, i.e. one of the medical conditions, therapies, devices, drugs, etc. investigated by the study. */ - public Builder studySubject(MedicalEntity medicalEntity) { + @NotNull public Builder studySubject(MedicalEntity medicalEntity) { this.studySubject = medicalEntity; return this; } /** * A subject of the study, i.e. one of the medical conditions, therapies, devices, drugs, etc. investigated by the study. */ - public Builder studySubject(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder studySubject(MedicalEntity.Builder medicalEntity) { return this.studySubject(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -264,7 +268,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -299,7 +303,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -332,7 +336,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -340,38 +344,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -401,40 +405,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder outcome(String outcome); - Builder population(String population); - Builder sponsor(Organization organization); - Builder sponsor(Organization.Builder organization); - Builder status(MedicalStudyStatus medicalStudyStatus); - Builder status(MedicalStudyStatus.Builder medicalStudyStatus); - Builder studyLocation(AdministrativeArea administrativeArea); - Builder studyLocation(AdministrativeArea.Builder administrativeArea); - Builder studySubject(MedicalEntity medicalEntity); - Builder studySubject(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder outcome(String outcome); + @NotNull Builder population(String population); + @NotNull Builder sponsor(Organization organization); + @NotNull Builder sponsor(Organization.Builder organization); + @NotNull Builder status(MedicalStudyStatus medicalStudyStatus); + @NotNull Builder status(MedicalStudyStatus.Builder medicalStudyStatus); + @NotNull Builder studyLocation(AdministrativeArea administrativeArea); + @NotNull Builder studyLocation(AdministrativeArea.Builder administrativeArea); + @NotNull Builder studySubject(MedicalEntity medicalEntity); + @NotNull Builder studySubject(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalStudy(String outcome, String population, Organization sponsor, MedicalStudyStatus status, AdministrativeArea studyLocation, MedicalEntity studySubject, 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) { diff --git a/src/main/java/org/schema/MedicalStudyStatus.java b/src/main/java/org/schema/MedicalStudyStatus.java index 433ea192..81bb37e1 100644 --- a/src/main/java/org/schema/MedicalStudyStatus.java +++ b/src/main/java/org/schema/MedicalStudyStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The status of a medical study. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalStudyStatus extends Enumeration { /** * Builder for {@link MedicalStudyStatus} */ - public static final class MedicalStudyStatusThingBuilder implements Builder { + static final class MedicalStudyStatusThingBuilder implements Builder { /** * Creates new {@link MedicalStudyStatus} instance. */ @@ -36,7 +40,7 @@ public MedicalStudyStatus build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalStudyStatus(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalSymptom.java b/src/main/java/org/schema/MedicalSymptom.java index 0bb73c15..a63b7f21 100644 --- a/src/main/java/org/schema/MedicalSymptom.java +++ b/src/main/java/org/schema/MedicalSymptom.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any indication of the existence of a medical condition or disease that is apparent to the patient. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalSymptom extends MedicalSignOrSymptom { /** * Builder for {@link MedicalSymptom} */ - public static final class MedicalSymptomThingBuilder implements Builder { + static final class MedicalSymptomThingBuilder implements Builder { /** * Creates new {@link MedicalSymptom} instance. */ @@ -36,125 +40,125 @@ public MedicalSymptom build() { /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause medicalCause) { + @NotNull public Builder cause(MedicalCause medicalCause) { this.cause = medicalCause; return this; } /** * An underlying cause. More specifically, one of the causative agent(s) that are most directly responsible for the pathophysiologic process that eventually results in the occurrence. */ - public Builder cause(MedicalCause.Builder medicalCause) { + @NotNull public Builder cause(MedicalCause.Builder medicalCause) { return this.cause(medicalCause.build()); } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy medicalTherapy) { this.possibleTreatment = medicalTherapy; return this; } /** * A possible treatment to address this condition, sign or symptom. */ - public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy) { return this.possibleTreatment(medicalTherapy.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -188,7 +192,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -223,7 +227,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -256,7 +260,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -264,38 +268,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -321,34 +325,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder cause(MedicalCause medicalCause); - Builder cause(MedicalCause.Builder medicalCause); - Builder possibleTreatment(MedicalTherapy medicalTherapy); - Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder cause(MedicalCause medicalCause); + @NotNull Builder cause(MedicalCause.Builder medicalCause); + @NotNull Builder possibleTreatment(MedicalTherapy medicalTherapy); + @NotNull Builder possibleTreatment(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MedicalTest.java b/src/main/java/org/schema/MedicalTest.java index 45c469ca..33c261c9 100644 --- a/src/main/java/org/schema/MedicalTest.java +++ b/src/main/java/org/schema/MedicalTest.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any medical test, typically performed for diagnostic purposes. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -56,7 +60,7 @@ public MedicalDevice getUsesDevice() { /** * Builder for {@link MedicalTest} */ - public static final class MedicalTestThingBuilder implements Builder { + static final class MedicalTestThingBuilder implements Builder { /** * Creates new {@link MedicalTest} instance. */ @@ -66,158 +70,158 @@ public MedicalTest build() { /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug drug) { + @NotNull public Builder affectedBy(Drug drug) { this.affectedBy = drug; return this; } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug.Builder drug) { + @NotNull public Builder affectedBy(Drug.Builder drug) { return this.affectedBy(drug.build()); } /** * Range of acceptable values for a typical patient, when applicable. */ - public Builder normalRange(String normalRange) { + @NotNull public Builder normalRange(String normalRange) { this.normalRange = normalRange; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign medicalSign) { + @NotNull public Builder signDetected(MedicalSign medicalSign) { this.signDetected = medicalSign; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign.Builder medicalSign) { + @NotNull public Builder signDetected(MedicalSign.Builder medicalSign) { return this.signDetected(medicalSign.build()); } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition medicalCondition) { this.usedToDiagnose = medicalCondition; return this; } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { return this.usedToDiagnose(medicalCondition.build()); } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice medicalDevice) { this.usesDevice = medicalDevice; return this; } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice.Builder medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice.Builder medicalDevice) { return this.usesDevice(medicalDevice.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -251,7 +255,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -286,7 +290,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -319,7 +323,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -327,38 +331,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -387,39 +391,39 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder affectedBy(Drug drug); - Builder affectedBy(Drug.Builder drug); - Builder normalRange(String normalRange); - Builder signDetected(MedicalSign medicalSign); - Builder signDetected(MedicalSign.Builder medicalSign); - Builder usedToDiagnose(MedicalCondition medicalCondition); - Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); - Builder usesDevice(MedicalDevice medicalDevice); - Builder usesDevice(MedicalDevice.Builder medicalDevice); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder affectedBy(Drug drug); + @NotNull Builder affectedBy(Drug.Builder drug); + @NotNull Builder normalRange(String normalRange); + @NotNull Builder signDetected(MedicalSign medicalSign); + @NotNull Builder signDetected(MedicalSign.Builder medicalSign); + @NotNull Builder usedToDiagnose(MedicalCondition medicalCondition); + @NotNull Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); + @NotNull Builder usesDevice(MedicalDevice medicalDevice); + @NotNull Builder usesDevice(MedicalDevice.Builder medicalDevice); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalTest(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) { diff --git a/src/main/java/org/schema/MedicalTestPanel.java b/src/main/java/org/schema/MedicalTestPanel.java index f6cd3b24..32a62fa1 100644 --- a/src/main/java/org/schema/MedicalTestPanel.java +++ b/src/main/java/org/schema/MedicalTestPanel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any collection of tests commonly ordered together. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public MedicalTest getSubTest() { /** * Builder for {@link MedicalTestPanel} */ - public static final class MedicalTestPanelThingBuilder implements Builder { + static final class MedicalTestPanelThingBuilder implements Builder { /** * Creates new {@link MedicalTestPanel} instance. */ @@ -42,171 +46,171 @@ public MedicalTestPanel build() { /** * A component test of the panel. */ - public Builder subTest(MedicalTest medicalTest) { + @NotNull public Builder subTest(MedicalTest medicalTest) { this.subTest = medicalTest; return this; } /** * A component test of the panel. */ - public Builder subTest(MedicalTest.Builder medicalTest) { + @NotNull public Builder subTest(MedicalTest.Builder medicalTest) { return this.subTest(medicalTest.build()); } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug drug) { + @NotNull public Builder affectedBy(Drug drug) { this.affectedBy = drug; return this; } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug.Builder drug) { + @NotNull public Builder affectedBy(Drug.Builder drug) { return this.affectedBy(drug.build()); } /** * Range of acceptable values for a typical patient, when applicable. */ - public Builder normalRange(String normalRange) { + @NotNull public Builder normalRange(String normalRange) { this.normalRange = normalRange; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign medicalSign) { + @NotNull public Builder signDetected(MedicalSign medicalSign) { this.signDetected = medicalSign; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign.Builder medicalSign) { + @NotNull public Builder signDetected(MedicalSign.Builder medicalSign) { return this.signDetected(medicalSign.build()); } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition medicalCondition) { this.usedToDiagnose = medicalCondition; return this; } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { return this.usedToDiagnose(medicalCondition.build()); } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice medicalDevice) { this.usesDevice = medicalDevice; return this; } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice.Builder medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice.Builder medicalDevice) { return this.usesDevice(medicalDevice.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -240,7 +244,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -275,7 +279,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -308,7 +312,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -316,38 +320,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -377,41 +381,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder subTest(MedicalTest medicalTest); - Builder subTest(MedicalTest.Builder medicalTest); - Builder affectedBy(Drug drug); - Builder affectedBy(Drug.Builder drug); - Builder normalRange(String normalRange); - Builder signDetected(MedicalSign medicalSign); - Builder signDetected(MedicalSign.Builder medicalSign); - Builder usedToDiagnose(MedicalCondition medicalCondition); - Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); - Builder usesDevice(MedicalDevice medicalDevice); - Builder usesDevice(MedicalDevice.Builder medicalDevice); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder subTest(MedicalTest medicalTest); + @NotNull Builder subTest(MedicalTest.Builder medicalTest); + @NotNull Builder affectedBy(Drug drug); + @NotNull Builder affectedBy(Drug.Builder drug); + @NotNull Builder normalRange(String normalRange); + @NotNull Builder signDetected(MedicalSign medicalSign); + @NotNull Builder signDetected(MedicalSign.Builder medicalSign); + @NotNull Builder usedToDiagnose(MedicalCondition medicalCondition); + @NotNull Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); + @NotNull Builder usesDevice(MedicalDevice medicalDevice); + @NotNull Builder usesDevice(MedicalDevice.Builder medicalDevice); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalTestPanel(MedicalTest subTest, 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) { diff --git a/src/main/java/org/schema/MedicalTherapy.java b/src/main/java/org/schema/MedicalTherapy.java index 54989815..d6c96e31 100644 --- a/src/main/java/org/schema/MedicalTherapy.java +++ b/src/main/java/org/schema/MedicalTherapy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any medical intervention designed to prevent, treat, and cure human diseases and medical conditions, including both curative and palliative therapies. Medical therapies are typically processes of care relying upon pharmacotherapy, behavioral therapy, supportive therapy (with fluid or nutrition for example), or detoxification (e.g. hemodialysis) aimed at improving or preventing a health condition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -56,7 +60,7 @@ public MedicalEntity getSeriousAdverseOutcome() { /** * Builder for {@link MedicalTherapy} */ - public static final class MedicalTherapyThingBuilder implements Builder { + static final class MedicalTherapyThingBuilder implements Builder { /** * Creates new {@link MedicalTherapy} instance. */ @@ -66,164 +70,164 @@ public MedicalTherapy build() { /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -257,7 +261,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -292,7 +296,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -325,7 +329,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -333,38 +337,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -393,40 +397,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalTherapy(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) { diff --git a/src/main/java/org/schema/MedicalTrial.java b/src/main/java/org/schema/MedicalTrial.java index 94203e03..4024c85b 100644 --- a/src/main/java/org/schema/MedicalTrial.java +++ b/src/main/java/org/schema/MedicalTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical trial is a type of medical study that uses scientific process used to compare the safety and efficacy of medical therapies or medical procedures. In general, medical trials are controlled and subjects are allocated at random to the different treatment and/or control groups. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -38,7 +42,7 @@ public MedicalTrialDesign getTrialDesign() { /** * Builder for {@link MedicalTrial} */ - public static final class MedicalTrialThingBuilder implements Builder { + static final class MedicalTrialThingBuilder implements Builder { /** * Creates new {@link MedicalTrial} instance. */ @@ -48,185 +52,185 @@ public MedicalTrial build() { /** * The phase of the trial. */ - public Builder phase(String phase) { + @NotNull public Builder phase(String phase) { this.phase = phase; return this; } /** * Specifics about the trial design (enumerated). */ - public Builder trialDesign(MedicalTrialDesign medicalTrialDesign) { + @NotNull public Builder trialDesign(MedicalTrialDesign medicalTrialDesign) { this.trialDesign = medicalTrialDesign; return this; } /** * Specifics about the trial design (enumerated). */ - public Builder trialDesign(MedicalTrialDesign.Builder medicalTrialDesign) { + @NotNull public Builder trialDesign(MedicalTrialDesign.Builder medicalTrialDesign) { return this.trialDesign(medicalTrialDesign.build()); } /** * Expected or actual outcomes of the study. */ - public Builder outcome(String outcome) { + @NotNull public Builder outcome(String outcome) { this.outcome = outcome; return this; } /** * Any characteristics of the population used in the study, e.g. 'males under 65'. */ - public Builder population(String population) { + @NotNull public Builder population(String population) { this.population = population; return this; } /** * Sponsor of the study. */ - public Builder sponsor(Organization organization) { + @NotNull public Builder sponsor(Organization organization) { this.sponsor = organization; return this; } /** * Sponsor of the study. */ - public Builder sponsor(Organization.Builder organization) { + @NotNull public Builder sponsor(Organization.Builder organization) { return this.sponsor(organization.build()); } /** * The status of the study (enumerated). */ - public Builder status(MedicalStudyStatus medicalStudyStatus) { + @NotNull public Builder status(MedicalStudyStatus medicalStudyStatus) { this.status = medicalStudyStatus; return this; } /** * The status of the study (enumerated). */ - public Builder status(MedicalStudyStatus.Builder medicalStudyStatus) { + @NotNull public Builder status(MedicalStudyStatus.Builder medicalStudyStatus) { return this.status(medicalStudyStatus.build()); } /** * The location in which the study is taking/took place. */ - public Builder studyLocation(AdministrativeArea administrativeArea) { + @NotNull public Builder studyLocation(AdministrativeArea administrativeArea) { this.studyLocation = administrativeArea; return this; } /** * The location in which the study is taking/took place. */ - public Builder studyLocation(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder studyLocation(AdministrativeArea.Builder administrativeArea) { return this.studyLocation(administrativeArea.build()); } /** * A subject of the study, i.e. one of the medical conditions, therapies, devices, drugs, etc. investigated by the study. */ - public Builder studySubject(MedicalEntity medicalEntity) { + @NotNull public Builder studySubject(MedicalEntity medicalEntity) { this.studySubject = medicalEntity; return this; } /** * A subject of the study, i.e. one of the medical conditions, therapies, devices, drugs, etc. investigated by the study. */ - public Builder studySubject(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder studySubject(MedicalEntity.Builder medicalEntity) { return this.studySubject(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -260,7 +264,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -328,7 +332,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -336,38 +340,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -399,43 +403,43 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder phase(String phase); - Builder trialDesign(MedicalTrialDesign medicalTrialDesign); - Builder trialDesign(MedicalTrialDesign.Builder medicalTrialDesign); - Builder outcome(String outcome); - Builder population(String population); - Builder sponsor(Organization organization); - Builder sponsor(Organization.Builder organization); - Builder status(MedicalStudyStatus medicalStudyStatus); - Builder status(MedicalStudyStatus.Builder medicalStudyStatus); - Builder studyLocation(AdministrativeArea administrativeArea); - Builder studyLocation(AdministrativeArea.Builder administrativeArea); - Builder studySubject(MedicalEntity medicalEntity); - Builder studySubject(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder phase(String phase); + @NotNull Builder trialDesign(MedicalTrialDesign medicalTrialDesign); + @NotNull Builder trialDesign(MedicalTrialDesign.Builder medicalTrialDesign); + @NotNull Builder outcome(String outcome); + @NotNull Builder population(String population); + @NotNull Builder sponsor(Organization organization); + @NotNull Builder sponsor(Organization.Builder organization); + @NotNull Builder status(MedicalStudyStatus medicalStudyStatus); + @NotNull Builder status(MedicalStudyStatus.Builder medicalStudyStatus); + @NotNull Builder studyLocation(AdministrativeArea administrativeArea); + @NotNull Builder studyLocation(AdministrativeArea.Builder administrativeArea); + @NotNull Builder studySubject(MedicalEntity medicalEntity); + @NotNull Builder studySubject(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalTrial(String phase, MedicalTrialDesign trialDesign, String outcome, String population, Organization sponsor, MedicalStudyStatus status, AdministrativeArea studyLocation, MedicalEntity studySubject, 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) { diff --git a/src/main/java/org/schema/MedicalTrialDesign.java b/src/main/java/org/schema/MedicalTrialDesign.java index fb7bae83..93101233 100644 --- a/src/main/java/org/schema/MedicalTrialDesign.java +++ b/src/main/java/org/schema/MedicalTrialDesign.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Design models for medical trials. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class MedicalTrialDesign extends Enumeration { /** * Builder for {@link MedicalTrialDesign} */ - public static final class MedicalTrialDesignThingBuilder implements Builder { + static final class MedicalTrialDesignThingBuilder implements Builder { /** * Creates new {@link MedicalTrialDesign} instance. */ @@ -36,7 +40,7 @@ public MedicalTrialDesign build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicalTrialDesign(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MedicalWebPage.java b/src/main/java/org/schema/MedicalWebPage.java index 2b2e26db..a9a431ed 100644 --- a/src/main/java/org/schema/MedicalWebPage.java +++ b/src/main/java/org/schema/MedicalWebPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A web page that provides medical information. */ @@ -31,7 +35,7 @@ public String getAspect() { /** * Builder for {@link MedicalWebPage} */ - public static final class MedicalWebPageThingBuilder implements Builder { + static final class MedicalWebPageThingBuilder implements Builder { /** * Creates new {@link MedicalWebPage} instance. */ @@ -41,14 +45,14 @@ public MedicalWebPage build() { /** * An aspect of medical practice that is considered on the page, such as 'diagnosis', 'treatment', 'causes', 'prognosis', 'etiology', 'epidemiology', etc. */ - public Builder aspect(String aspect) { + @NotNull public Builder aspect(String aspect) { this.aspect = aspect; return this; } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -56,13 +60,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -70,47 +74,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -118,13 +122,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -132,153 +136,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -286,13 +290,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -300,20 +304,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -321,13 +325,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -335,40 +339,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -376,13 +380,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -390,13 +394,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -404,13 +408,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -418,21 +422,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -440,7 +444,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -448,7 +452,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -456,7 +460,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -464,7 +468,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -472,13 +476,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -486,101 +490,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -588,13 +592,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -602,35 +606,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -638,13 +642,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -652,53 +656,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -706,13 +710,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -720,127 +724,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -848,7 +852,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -856,7 +860,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -864,7 +868,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -872,20 +876,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -893,13 +897,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -907,66 +911,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -974,13 +978,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -988,40 +992,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1055,7 +1059,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1090,7 +1094,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1123,7 +1127,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1131,38 +1135,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1234,7 +1238,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1252,161 +1256,161 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aspect(String aspect); - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aspect(String aspect); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MedicalWebPage(String aspect, 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) { + protected MedicalWebPage(String aspect, 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, int 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); myAspect = aspect; } diff --git a/src/main/java/org/schema/MedicineSystem.java b/src/main/java/org/schema/MedicineSystem.java index 83011dd5..d0529589 100644 --- a/src/main/java/org/schema/MedicineSystem.java +++ b/src/main/java/org/schema/MedicineSystem.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Systems of medical practice. */ @@ -25,7 +29,7 @@ public class MedicineSystem extends Enumeration { /** * Builder for {@link MedicineSystem} */ - public static final class MedicineSystemThingBuilder implements Builder { + static final class MedicineSystemThingBuilder implements Builder { /** * Creates new {@link MedicineSystem} instance. */ @@ -35,7 +39,7 @@ public MedicineSystem build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MedicineSystem(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MensClothingStore.java b/src/main/java/org/schema/MensClothingStore.java index f87a14ec..dca31800 100644 --- a/src/main/java/org/schema/MensClothingStore.java +++ b/src/main/java/org/schema/MensClothingStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A men's clothing store. */ @@ -25,7 +29,7 @@ public class MensClothingStore extends Store { /** * Builder for {@link MensClothingStore} */ - public static final class MensClothingStoreThingBuilder implements Builder { + static final class MensClothingStoreThingBuilder implements Builder { /** * Creates new {@link MensClothingStore} instance. */ @@ -35,107 +39,107 @@ public MensClothingStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MiddleSchool.java b/src/main/java/org/schema/MiddleSchool.java index c673b763..10e34cde 100644 --- a/src/main/java/org/schema/MiddleSchool.java +++ b/src/main/java/org/schema/MiddleSchool.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A middle school (typically for children aged around 11-14, although this varies somewhat). */ @@ -25,7 +29,7 @@ public class MiddleSchool extends EducationalOrganization { /** * Builder for {@link MiddleSchool} */ - public static final class MiddleSchoolThingBuilder implements Builder { + static final class MiddleSchoolThingBuilder implements Builder { /** * Creates new {@link MiddleSchool} instance. */ @@ -35,53 +39,53 @@ public MiddleSchool build() { /** * Alumni of educational organization. */ - public Builder alumni(Person person) { + @NotNull public Builder alumni(Person person) { this.alumni = person; return this; } /** * Alumni of educational organization. */ - public Builder alumni(Person.Builder person) { + @NotNull public Builder alumni(Person.Builder person) { return this.alumni(person.build()); } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -89,13 +93,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -103,147 +107,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -251,13 +255,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -265,20 +269,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -286,13 +290,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -300,13 +304,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -314,13 +318,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -328,33 +332,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -362,13 +366,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -376,100 +380,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -503,7 +507,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -538,7 +542,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -571,7 +575,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -579,38 +583,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -661,80 +665,80 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder alumni(Person person); - Builder alumni(Person.Builder person); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder alumni(Person person); + @NotNull Builder alumni(Person.Builder person); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Midwifery.java b/src/main/java/org/schema/Midwifery.java index a5105c0a..e8204c89 100644 --- a/src/main/java/org/schema/Midwifery.java +++ b/src/main/java/org/schema/Midwifery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Midwifery. */ @@ -25,7 +29,7 @@ public class Midwifery { /** * Builder for {@link Midwifery} */ - public static final class MidwiferyThingBuilder implements Builder { + static final class MidwiferyThingBuilder implements Builder { /** * Creates new {@link Midwifery} instance. */ @@ -34,7 +38,7 @@ public Midwifery build() { } } public interface Builder extends ThingBuilder { - + } protected Midwifery() { diff --git a/src/main/java/org/schema/MixtapeAlbum.java b/src/main/java/org/schema/MixtapeAlbum.java index 4b816c7c..2330d501 100644 --- a/src/main/java/org/schema/MixtapeAlbum.java +++ b/src/main/java/org/schema/MixtapeAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * MixtapeAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class MixtapeAlbum { /** * Builder for {@link MixtapeAlbum} */ - public static final class MixtapeAlbumThingBuilder implements Builder { + static final class MixtapeAlbumThingBuilder implements Builder { /** * Creates new {@link MixtapeAlbum} instance. */ @@ -35,7 +39,7 @@ public MixtapeAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected MixtapeAlbum() { diff --git a/src/main/java/org/schema/MobileApplication.java b/src/main/java/org/schema/MobileApplication.java index 81d4e3bc..519c5cee 100644 --- a/src/main/java/org/schema/MobileApplication.java +++ b/src/main/java/org/schema/MobileApplication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A software application designed specifically to work well on a mobile device such as a telephone. */ @@ -31,7 +35,7 @@ public String getCarrierRequirements() { /** * Builder for {@link MobileApplication} */ - public static final class MobileApplicationThingBuilder implements Builder { + static final class MobileApplicationThingBuilder implements Builder { /** * Creates new {@link MobileApplication} instance. */ @@ -41,133 +45,133 @@ public MobileApplication build() { /** * Specifies specific carrier(s) requirements for the application (e.g. an application may only work on a specific carrier network). */ - public Builder carrierRequirements(String carrierRequirements) { + @NotNull public Builder carrierRequirements(String carrierRequirements) { this.carrierRequirements = carrierRequirements; return this; } /** * Type of software application, e.g. "Game, Multimedia". */ - public Builder applicationCategory(String applicationCategory) { + @NotNull public Builder applicationCategory(String applicationCategory) { this.applicationCategory = applicationCategory; return this; } /** * Subcategory of the application, e.g. "Arcade Game". */ - public Builder applicationSubCategory(String applicationSubCategory) { + @NotNull public Builder applicationSubCategory(String applicationSubCategory) { this.applicationSubCategory = applicationSubCategory; return this; } /** * The name of the application suite to which the application belongs (e.g. Excel belongs to Office). */ - public Builder applicationSuite(String applicationSuite) { + @NotNull public Builder applicationSuite(String applicationSuite) { this.applicationSuite = applicationSuite; return this; } /** * Countries for which the application is not supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder countriesNotSupported(String countriesNotSupported) { + @NotNull public Builder countriesNotSupported(String countriesNotSupported) { this.countriesNotSupported = countriesNotSupported; return this; } /** * Countries for which the application is supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder countriesSupported(String countriesSupported) { + @NotNull public Builder countriesSupported(String countriesSupported) { this.countriesSupported = countriesSupported; return this; } /** * Device required to run the application. Used in cases where a specific make/model is required to run the application. */ - public Builder availableOnDevice(String availableOnDevice) { + @NotNull public Builder availableOnDevice(String availableOnDevice) { this.availableOnDevice = availableOnDevice; return this; } /** * If the file can be downloaded, URL to download the binary. */ - public Builder downloadUrl(String downloadUrl) { + @NotNull public Builder downloadUrl(String downloadUrl) { this.downloadUrl = downloadUrl; return this; } /** * Features or modules provided by this application (and possibly required by other applications). */ - public Builder featureList(String featureList) { + @NotNull public Builder featureList(String featureList) { this.featureList = featureList; return this; } /** * MIME format of the binary (e.g. application/zip). */ - public Builder fileFormat(String fileFormat) { + @NotNull public Builder fileFormat(String fileFormat) { this.fileFormat = fileFormat; return this; } /** * Size of the application / package (e.g. 18MB). In the absence of a unit (MB, KB etc.), KB will be assumed. */ - public Builder fileSize(Integer integer) { - this.fileSize = integer; + @NotNull public Builder fileSize(int fileSize) { + this.fileSize = fileSize; return this; } /** * URL at which the app may be installed, if different from the URL of the item. */ - public Builder installUrl(String installUrl) { + @NotNull public Builder installUrl(String installUrl) { this.installUrl = installUrl; return this; } /** * Minimum memory requirements. */ - public Builder memoryRequirements(String memoryRequirements) { + @NotNull public Builder memoryRequirements(String memoryRequirements) { this.memoryRequirements = memoryRequirements; return this; } /** * Operating systems supported (Windows 7, OSX 10.6, Android 1.6). */ - public Builder operatingSystem(String operatingSystem) { + @NotNull public Builder operatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; return this; } /** * Permission(s) required to run the app (for example, a mobile app may require full internet access or may run only on wifi). */ - public Builder permissions(String permissions) { + @NotNull public Builder permissions(String permissions) { this.permissions = permissions; return this; } /** * Processor architecture required to run the application (e.g. IA64). */ - public Builder processorRequirements(String processorRequirements) { + @NotNull public Builder processorRequirements(String processorRequirements) { this.processorRequirements = processorRequirements; return this; } /** * Description of what changed in this version. */ - public Builder releaseNotes(String releaseNotes) { + @NotNull public Builder releaseNotes(String releaseNotes) { this.releaseNotes = releaseNotes; return this; } /** * Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (Examples: DirectX, Java or .NET runtime). */ - public Builder softwareRequirements(String softwareRequirements) { + @NotNull public Builder softwareRequirements(String softwareRequirements) { this.softwareRequirements = softwareRequirements; return this; } /** * A link to a screenshot image of the app. */ - public Builder screenshot(ImageObject imageObject) { + @NotNull public Builder screenshot(ImageObject imageObject) { if (this.screenshot == null) this.screenshot = new ImageObjectOrString(); this.screenshot.setImageObject(imageObject); return this; @@ -175,13 +179,13 @@ public Builder screenshot(ImageObject imageObject) { /** * A link to a screenshot image of the app. */ - public Builder screenshot(ImageObject.Builder imageObject) { + @NotNull public Builder screenshot(ImageObject.Builder imageObject) { return this.screenshot(imageObject.build()); } /** * A link to a screenshot image of the app. */ - public Builder screenshot(String screenshot) { + @NotNull public Builder screenshot(String screenshot) { if (this.screenshot == null) this.screenshot = new ImageObjectOrString(); this.screenshot.setString(screenshot); return this; @@ -189,167 +193,167 @@ public Builder screenshot(String screenshot) { /** * Version of the software instance. */ - public Builder softwareVersion(String softwareVersion) { + @NotNull public Builder softwareVersion(String softwareVersion) { this.softwareVersion = softwareVersion; return this; } /** * Storage requirements (free space required). */ - public Builder storageRequirements(String storageRequirements) { + @NotNull public Builder storageRequirements(String storageRequirements) { this.storageRequirements = storageRequirements; return this; } /** * Additional content for a software application. */ - public Builder softwareAddOn(SoftwareApplication softwareApplication) { + @NotNull public Builder softwareAddOn(SoftwareApplication softwareApplication) { this.softwareAddOn = softwareApplication; return this; } /** * Additional content for a software application. */ - public Builder softwareAddOn(SoftwareApplication.Builder softwareApplication) { + @NotNull public Builder softwareAddOn(SoftwareApplication.Builder softwareApplication) { return this.softwareAddOn(softwareApplication.build()); } /** * Software application help. */ - public Builder softwareHelp(CreativeWork creativeWork) { + @NotNull public Builder softwareHelp(CreativeWork creativeWork) { this.softwareHelp = creativeWork; return this; } /** * Software application help. */ - public Builder softwareHelp(CreativeWork.Builder creativeWork) { + @NotNull public Builder softwareHelp(CreativeWork.Builder creativeWork) { return this.softwareHelp(creativeWork.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -357,13 +361,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -371,20 +375,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -392,13 +396,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -406,40 +410,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -447,13 +451,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -461,13 +465,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -475,13 +479,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -489,21 +493,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -511,7 +515,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -519,7 +523,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -527,7 +531,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -535,7 +539,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -543,13 +547,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -557,101 +561,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -659,13 +663,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -673,35 +677,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -709,13 +713,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -723,53 +727,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -777,13 +781,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -791,127 +795,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -919,7 +923,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -927,7 +931,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -935,7 +939,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -943,20 +947,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -964,13 +968,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -978,66 +982,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1045,13 +1049,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1059,40 +1063,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1126,7 +1130,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1161,7 +1165,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1194,7 +1198,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1202,38 +1206,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1250,7 +1254,7 @@ public Builder id(long id) { private String downloadUrl; private String featureList; private String fileFormat; - private Integer fileSize; + private int fileSize; private String installUrl; private String memoryRequirements; private String operatingSystem; @@ -1319,7 +1323,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1337,171 +1341,171 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder carrierRequirements(String carrierRequirements); - Builder applicationCategory(String applicationCategory); - Builder applicationSubCategory(String applicationSubCategory); - Builder applicationSuite(String applicationSuite); - Builder countriesNotSupported(String countriesNotSupported); - Builder countriesSupported(String countriesSupported); - Builder availableOnDevice(String availableOnDevice); - Builder downloadUrl(String downloadUrl); - Builder featureList(String featureList); - Builder fileFormat(String fileFormat); - Builder fileSize(Integer integer); - Builder installUrl(String installUrl); - Builder memoryRequirements(String memoryRequirements); - Builder operatingSystem(String operatingSystem); - Builder permissions(String permissions); - Builder processorRequirements(String processorRequirements); - Builder releaseNotes(String releaseNotes); - Builder softwareRequirements(String softwareRequirements); - Builder screenshot(ImageObject imageObject); - Builder screenshot(ImageObject.Builder imageObject); - Builder screenshot(String screenshot); - Builder softwareVersion(String softwareVersion); - Builder storageRequirements(String storageRequirements); - Builder softwareAddOn(SoftwareApplication softwareApplication); - Builder softwareAddOn(SoftwareApplication.Builder softwareApplication); - Builder softwareHelp(CreativeWork creativeWork); - Builder softwareHelp(CreativeWork.Builder creativeWork); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder carrierRequirements(String carrierRequirements); + @NotNull Builder applicationCategory(String applicationCategory); + @NotNull Builder applicationSubCategory(String applicationSubCategory); + @NotNull Builder applicationSuite(String applicationSuite); + @NotNull Builder countriesNotSupported(String countriesNotSupported); + @NotNull Builder countriesSupported(String countriesSupported); + @NotNull Builder availableOnDevice(String availableOnDevice); + @NotNull Builder downloadUrl(String downloadUrl); + @NotNull Builder featureList(String featureList); + @NotNull Builder fileFormat(String fileFormat); + @NotNull Builder fileSize(int fileSize); + @NotNull Builder installUrl(String installUrl); + @NotNull Builder memoryRequirements(String memoryRequirements); + @NotNull Builder operatingSystem(String operatingSystem); + @NotNull Builder permissions(String permissions); + @NotNull Builder processorRequirements(String processorRequirements); + @NotNull Builder releaseNotes(String releaseNotes); + @NotNull Builder softwareRequirements(String softwareRequirements); + @NotNull Builder screenshot(ImageObject imageObject); + @NotNull Builder screenshot(ImageObject.Builder imageObject); + @NotNull Builder screenshot(String screenshot); + @NotNull Builder softwareVersion(String softwareVersion); + @NotNull Builder storageRequirements(String storageRequirements); + @NotNull Builder softwareAddOn(SoftwareApplication softwareApplication); + @NotNull Builder softwareAddOn(SoftwareApplication.Builder softwareApplication); + @NotNull Builder softwareHelp(CreativeWork creativeWork); + @NotNull Builder softwareHelp(CreativeWork.Builder creativeWork); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MobileApplication(String carrierRequirements, String applicationCategory, String applicationSubCategory, String applicationSuite, String countriesNotSupported, String countriesSupported, String availableOnDevice, String downloadUrl, String featureList, String fileFormat, Integer fileSize, String installUrl, String memoryRequirements, String operatingSystem, String permissions, String processorRequirements, String releaseNotes, String softwareRequirements, ImageObjectOrString screenshot, String softwareVersion, String storageRequirements, SoftwareApplication softwareAddOn, CreativeWork softwareHelp, 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) { + protected MobileApplication(String carrierRequirements, String applicationCategory, String applicationSubCategory, String applicationSuite, String countriesNotSupported, String countriesSupported, String availableOnDevice, String downloadUrl, String featureList, String fileFormat, int fileSize, String installUrl, String memoryRequirements, String operatingSystem, String permissions, String processorRequirements, String releaseNotes, String softwareRequirements, ImageObjectOrString screenshot, String softwareVersion, String storageRequirements, SoftwareApplication softwareAddOn, CreativeWork softwareHelp, 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, int 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(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; } diff --git a/src/main/java/org/schema/MobilePhoneStore.java b/src/main/java/org/schema/MobilePhoneStore.java index e9719fab..521ec0bc 100644 --- a/src/main/java/org/schema/MobilePhoneStore.java +++ b/src/main/java/org/schema/MobilePhoneStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A store that sells mobile phones and related accessories. */ @@ -25,7 +29,7 @@ public class MobilePhoneStore extends Store { /** * Builder for {@link MobilePhoneStore} */ - public static final class MobilePhoneStoreThingBuilder implements Builder { + static final class MobilePhoneStoreThingBuilder implements Builder { /** * Creates new {@link MobilePhoneStore} instance. */ @@ -35,107 +39,107 @@ public MobilePhoneStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Mosque.java b/src/main/java/org/schema/Mosque.java index 090cbb68..89903410 100644 --- a/src/main/java/org/schema/Mosque.java +++ b/src/main/java/org/schema/Mosque.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A mosque. */ @@ -25,7 +29,7 @@ public class Mosque extends PlaceOfWorship { /** * Builder for {@link Mosque} */ - public static final class MosqueThingBuilder implements Builder { + static final class MosqueThingBuilder implements Builder { /** * Creates new {@link Mosque} instance. */ @@ -35,73 +39,73 @@ public Mosque build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Motel.java b/src/main/java/org/schema/Motel.java index d9ec5672..8ba05e8d 100644 --- a/src/main/java/org/schema/Motel.java +++ b/src/main/java/org/schema/Motel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A motel. */ @@ -25,7 +29,7 @@ public class Motel extends LodgingBusiness { /** * Builder for {@link Motel} */ - public static final class MotelThingBuilder implements Builder { + static final class MotelThingBuilder implements Builder { /** * Creates new {@link Motel} instance. */ @@ -35,107 +39,107 @@ public Motel build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MotorcycleDealer.java b/src/main/java/org/schema/MotorcycleDealer.java index 49752a5e..83eb96e3 100644 --- a/src/main/java/org/schema/MotorcycleDealer.java +++ b/src/main/java/org/schema/MotorcycleDealer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A motorcycle dealer. */ @@ -25,7 +29,7 @@ public class MotorcycleDealer extends AutomotiveBusiness { /** * Builder for {@link MotorcycleDealer} */ - public static final class MotorcycleDealerThingBuilder implements Builder { + static final class MotorcycleDealerThingBuilder implements Builder { /** * Creates new {@link MotorcycleDealer} instance. */ @@ -35,107 +39,107 @@ public MotorcycleDealer build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MotorcycleRepair.java b/src/main/java/org/schema/MotorcycleRepair.java index 084b96d2..c7fa7d5d 100644 --- a/src/main/java/org/schema/MotorcycleRepair.java +++ b/src/main/java/org/schema/MotorcycleRepair.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A motorcycle repair shop. */ @@ -25,7 +29,7 @@ public class MotorcycleRepair extends AutomotiveBusiness { /** * Builder for {@link MotorcycleRepair} */ - public static final class MotorcycleRepairThingBuilder implements Builder { + static final class MotorcycleRepairThingBuilder implements Builder { /** * Creates new {@link MotorcycleRepair} instance. */ @@ -35,107 +39,107 @@ public MotorcycleRepair build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Mountain.java b/src/main/java/org/schema/Mountain.java index ce50300a..81e2ec32 100644 --- a/src/main/java/org/schema/Mountain.java +++ b/src/main/java/org/schema/Mountain.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A mountain, like Mount Whitney or Mount Everest. */ @@ -25,7 +29,7 @@ public class Mountain extends Landform { /** * Builder for {@link Mountain} */ - public static final class MountainThingBuilder implements Builder { + static final class MountainThingBuilder implements Builder { /** * Creates new {@link Mountain} instance. */ @@ -35,66 +39,66 @@ public Mountain build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MoveAction.java b/src/main/java/org/schema/MoveAction.java index cacdeeea..a64c560e 100644 --- a/src/main/java/org/schema/MoveAction.java +++ b/src/main/java/org/schema/MoveAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of an agent relocating to a place.

Related actions:

  • TransferAction: Unlike TransferAction, the subject of the move is a living Person or Organization rather than an inanimate object
. */ @@ -37,7 +41,7 @@ public Place getToLocation() { /** * Builder for {@link MoveAction} */ - public static final class MoveActionThingBuilder implements Builder { + static final class MoveActionThingBuilder implements Builder { /** * Creates new {@link MoveAction} instance. */ @@ -47,33 +51,33 @@ public MoveAction build() { /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -81,13 +85,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -95,7 +99,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -103,7 +107,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -112,67 +116,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -206,7 +210,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -241,7 +245,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -274,7 +278,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -282,38 +286,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -339,34 +343,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MoveAction(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) { diff --git a/src/main/java/org/schema/Movie.java b/src/main/java/org/schema/Movie.java index eaac4835..29019af0 100644 --- a/src/main/java/org/schema/Movie.java +++ b/src/main/java/org/schema/Movie.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A movie. */ @@ -67,7 +71,7 @@ public VideoObject getTrailer() { /** * Builder for {@link Movie} */ - public static final class MovieThingBuilder implements Builder { + static final class MovieThingBuilder implements Builder { /** * Creates new {@link Movie} instance. */ @@ -77,46 +81,46 @@ public Movie build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -124,13 +128,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -138,26 +142,26 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(Language language) { + @NotNull public Builder subtitleLanguage(Language language) { if (this.subtitleLanguage == null) this.subtitleLanguage = new LanguageOrString(); this.subtitleLanguage.setLanguage(language); return this; @@ -165,13 +169,13 @@ public Builder subtitleLanguage(Language language) { /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(Language.Builder language) { + @NotNull public Builder subtitleLanguage(Language.Builder language) { return this.subtitleLanguage(language.build()); } /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(String subtitleLanguage) { + @NotNull public Builder subtitleLanguage(String subtitleLanguage) { if (this.subtitleLanguage == null) this.subtitleLanguage = new LanguageOrString(); this.subtitleLanguage.setString(subtitleLanguage); return this; @@ -179,140 +183,140 @@ public Builder subtitleLanguage(String subtitleLanguage) { /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -320,13 +324,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -334,20 +338,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -355,13 +359,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -369,40 +373,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -410,13 +414,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -424,13 +428,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -438,13 +442,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -452,21 +456,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -474,7 +478,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -482,7 +486,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -490,7 +494,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -498,7 +502,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -506,13 +510,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -520,101 +524,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -622,13 +626,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -636,35 +640,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -672,13 +676,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -686,53 +690,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -740,13 +744,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -754,127 +758,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -882,7 +886,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -890,7 +894,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -898,7 +902,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -906,20 +910,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -927,13 +931,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -941,66 +945,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1008,13 +1012,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1022,40 +1026,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1089,7 +1093,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1124,7 +1128,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1157,7 +1161,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1165,38 +1169,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1266,7 +1270,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1284,161 +1288,161 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder subtitleLanguage(Language language); - Builder subtitleLanguage(Language.Builder language); - Builder subtitleLanguage(String subtitleLanguage); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder subtitleLanguage(Language language); + @NotNull Builder subtitleLanguage(Language.Builder language); + @NotNull Builder subtitleLanguage(String subtitleLanguage); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Movie(Person actor, Person director, Duration duration, MusicGroupOrPerson musicBy, Organization productionCompany, LanguageOrString subtitleLanguage, 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) { + protected Movie(Person actor, Person director, Duration duration, MusicGroupOrPerson musicBy, Organization productionCompany, LanguageOrString subtitleLanguage, 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, int 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); myActor = actor; myDirector = director; diff --git a/src/main/java/org/schema/MovieClip.java b/src/main/java/org/schema/MovieClip.java index 66f233aa..049e1052 100644 --- a/src/main/java/org/schema/MovieClip.java +++ b/src/main/java/org/schema/MovieClip.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A short segment/part of a movie. */ @@ -25,7 +29,7 @@ public class MovieClip extends Clip { /** * Builder for {@link MovieClip} */ - public static final class MovieClipThingBuilder implements Builder { + static final class MovieClipThingBuilder implements Builder { /** * Creates new {@link MovieClip} instance. */ @@ -35,40 +39,40 @@ public MovieClip build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * Position of the clip within an ordered group of clips. */ - public Builder clipNumber(Position position) { + @NotNull public Builder clipNumber(Position position) { this.clipNumber = position; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -76,13 +80,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -90,154 +94,154 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The episode to which this clip belongs. */ - public Builder partOfEpisode(IsPartOf isPartOf) { + @NotNull public Builder partOfEpisode(IsPartOf isPartOf) { this.partOfEpisode = isPartOf; return this; } /** * The season to which this episode belongs. */ - public Builder partOfSeason(IsPartOf isPartOf) { + @NotNull public Builder partOfSeason(IsPartOf isPartOf) { this.partOfSeason = isPartOf; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -245,13 +249,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -259,20 +263,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -280,13 +284,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -294,40 +298,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -335,13 +339,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -349,13 +353,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -377,21 +381,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -399,7 +403,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -407,7 +411,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -415,7 +419,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -423,7 +427,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -431,13 +435,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -445,101 +449,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -547,13 +551,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -561,35 +565,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -597,13 +601,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -611,53 +615,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -665,13 +669,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -679,127 +683,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -807,7 +811,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -815,7 +819,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -823,7 +827,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -831,20 +835,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -852,13 +856,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -866,66 +870,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -933,13 +937,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -947,40 +951,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1014,7 +1018,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1049,7 +1053,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1082,7 +1086,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1090,38 +1094,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1191,7 +1195,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1209,156 +1213,156 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder clipNumber(Position position); - Builder director(Person person); - Builder director(Person.Builder person); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder partOfEpisode(IsPartOf isPartOf); - Builder partOfSeason(IsPartOf isPartOf); - Builder partOfSeries(IsPartOf isPartOf); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder clipNumber(Position position); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder partOfEpisode(IsPartOf isPartOf); + @NotNull Builder partOfSeason(IsPartOf isPartOf); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/MovieRentalStore.java b/src/main/java/org/schema/MovieRentalStore.java index e03c3f45..0609b2f4 100644 --- a/src/main/java/org/schema/MovieRentalStore.java +++ b/src/main/java/org/schema/MovieRentalStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A movie rental store. */ @@ -25,7 +29,7 @@ public class MovieRentalStore extends Store { /** * Builder for {@link MovieRentalStore} */ - public static final class MovieRentalStoreThingBuilder implements Builder { + static final class MovieRentalStoreThingBuilder implements Builder { /** * Creates new {@link MovieRentalStore} instance. */ @@ -35,107 +39,107 @@ public MovieRentalStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MovieSeries.java b/src/main/java/org/schema/MovieSeries.java index 3d2f4e6d..5ba73e1f 100644 --- a/src/main/java/org/schema/MovieSeries.java +++ b/src/main/java/org/schema/MovieSeries.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A series of movies. Included movies can be indicated with the hasPart property. */ @@ -49,7 +53,7 @@ public VideoObject getTrailer() { /** * Builder for {@link MovieSeries} */ - public static final class MovieSeriesThingBuilder implements Builder { + static final class MovieSeriesThingBuilder implements Builder { /** * Creates new {@link MovieSeries} instance. */ @@ -59,20 +63,20 @@ public MovieSeries build() { /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -80,13 +84,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -94,173 +98,173 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -268,13 +272,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -282,20 +286,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -303,13 +307,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -317,40 +321,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -358,13 +362,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -372,13 +376,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -386,13 +390,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -400,21 +404,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -422,7 +426,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -430,7 +434,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -438,7 +442,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -446,7 +450,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -454,13 +458,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -468,101 +472,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -570,13 +574,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -584,35 +588,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -620,13 +624,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -634,53 +638,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -688,13 +692,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -702,127 +706,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -830,7 +834,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -838,7 +842,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -846,7 +850,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -854,20 +858,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -875,13 +879,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -889,66 +893,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -956,13 +960,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -970,40 +974,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1037,7 +1041,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1072,7 +1076,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1105,7 +1109,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1113,38 +1117,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1213,7 +1217,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1231,156 +1235,156 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder director(Person person); - Builder director(Person.Builder person); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder endDate(java.util.Date date); - Builder startDate(java.util.Date date); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MovieSeries(Person director, MusicGroupOrPerson musicBy, Organization productionCompany, VideoObject trailer, 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) { + protected MovieSeries(Person director, MusicGroupOrPerson musicBy, Organization productionCompany, VideoObject trailer, 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, int 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); myDirector = director; myMusicBy = musicBy; diff --git a/src/main/java/org/schema/MovieTheater.java b/src/main/java/org/schema/MovieTheater.java index e7807218..4be28f79 100644 --- a/src/main/java/org/schema/MovieTheater.java +++ b/src/main/java/org/schema/MovieTheater.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A movie theater. */ @@ -31,7 +35,7 @@ public Number getScreenCount() { /** * Builder for {@link MovieTheater} */ - public static final class MovieTheaterThingBuilder implements Builder { + static final class MovieTheaterThingBuilder implements Builder { /** * Creates new {@link MovieTheater} instance. */ @@ -41,15 +45,15 @@ public MovieTheater build() { /** * The number of screens in the movie theater. */ - public Builder screenCount(Integer integer) { + @NotNull public Builder screenCount(int screenCount) { if (this.screenCount == null) this.screenCount = new Number(); - this.screenCount.setInteger(integer); + this.screenCount.setInt(screenCount); return this; } /** * The number of screens in the movie theater. */ - public Builder screenCount(Long screenCount) { + @NotNull public Builder screenCount(long screenCount) { if (this.screenCount == null) this.screenCount = new Number(); this.screenCount.setLong(screenCount); return this; @@ -57,7 +61,7 @@ public Builder screenCount(Long screenCount) { /** * The number of screens in the movie theater. */ - public Builder screenCount(Float screenCount) { + @NotNull public Builder screenCount(float screenCount) { if (this.screenCount == null) this.screenCount = new Number(); this.screenCount.setFloat(screenCount); return this; @@ -65,7 +69,7 @@ public Builder screenCount(Float screenCount) { /** * The number of screens in the movie theater. */ - public Builder screenCount(Double screenCount) { + @NotNull public Builder screenCount(double screenCount) { if (this.screenCount == null) this.screenCount = new Number(); this.screenCount.setDouble(screenCount); return this; @@ -73,7 +77,7 @@ public Builder screenCount(Double screenCount) { /** * The number of screens in the movie theater. */ - public Builder screenCount(String screenCount) { + @NotNull public Builder screenCount(String screenCount) { if (this.screenCount == null) this.screenCount = new Number(); this.screenCount.setString(screenCount); return this; @@ -81,107 +85,107 @@ public Builder screenCount(String screenCount) { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -189,13 +193,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -203,27 +207,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -231,13 +235,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -245,7 +249,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -253,13 +257,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -267,20 +271,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -288,13 +292,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -302,26 +306,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -331,7 +335,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -341,27 +345,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -395,7 +399,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -430,7 +434,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -463,7 +467,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -471,38 +475,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -541,61 +545,61 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder screenCount(Integer integer); - Builder screenCount(Long screenCount); - Builder screenCount(Float screenCount); - Builder screenCount(Double screenCount); - Builder screenCount(String screenCount); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder screenCount(int screenCount); + @NotNull Builder screenCount(long screenCount); + @NotNull Builder screenCount(float screenCount); + @NotNull Builder screenCount(double screenCount); + @NotNull Builder screenCount(String screenCount); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MovieTheater(Number screenCount, 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) { diff --git a/src/main/java/org/schema/MovingCompany.java b/src/main/java/org/schema/MovingCompany.java index ab499c84..11f69bba 100644 --- a/src/main/java/org/schema/MovingCompany.java +++ b/src/main/java/org/schema/MovingCompany.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A moving company. */ @@ -25,7 +29,7 @@ public class MovingCompany extends HomeAndConstructionBusiness { /** * Builder for {@link MovingCompany} */ - public static final class MovingCompanyThingBuilder implements Builder { + static final class MovingCompanyThingBuilder implements Builder { /** * Creates new {@link MovingCompany} instance. */ @@ -35,107 +39,107 @@ public MovingCompany build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MultiCenterTrial.java b/src/main/java/org/schema/MultiCenterTrial.java index 7c3985d1..3978ea6c 100644 --- a/src/main/java/org/schema/MultiCenterTrial.java +++ b/src/main/java/org/schema/MultiCenterTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A trial that takes place at multiple centers. */ @@ -25,7 +29,7 @@ public class MultiCenterTrial { /** * Builder for {@link MultiCenterTrial} */ - public static final class MultiCenterTrialThingBuilder implements Builder { + static final class MultiCenterTrialThingBuilder implements Builder { /** * Creates new {@link MultiCenterTrial} instance. */ @@ -34,7 +38,7 @@ public MultiCenterTrial build() { } } public interface Builder extends ThingBuilder { - + } protected MultiCenterTrial() { diff --git a/src/main/java/org/schema/MultiPlayer.java b/src/main/java/org/schema/MultiPlayer.java index 2109bb11..911fb140 100644 --- a/src/main/java/org/schema/MultiPlayer.java +++ b/src/main/java/org/schema/MultiPlayer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Play mode: MultiPlayer. Requiring or allowing multiple human players to play simultaneously. */ @@ -25,7 +29,7 @@ public class MultiPlayer { /** * Builder for {@link MultiPlayer} */ - public static final class MultiPlayerThingBuilder implements Builder { + static final class MultiPlayerThingBuilder implements Builder { /** * Creates new {@link MultiPlayer} instance. */ @@ -34,7 +38,7 @@ public MultiPlayer build() { } } public interface Builder extends ThingBuilder { - + } protected MultiPlayer() { diff --git a/src/main/java/org/schema/MulticellularParasite.java b/src/main/java/org/schema/MulticellularParasite.java index 61c048a0..f331c74a 100644 --- a/src/main/java/org/schema/MulticellularParasite.java +++ b/src/main/java/org/schema/MulticellularParasite.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Multicellular parasite that causes an infection. */ @@ -25,7 +29,7 @@ public class MulticellularParasite { /** * Builder for {@link MulticellularParasite} */ - public static final class MulticellularParasiteThingBuilder implements Builder { + static final class MulticellularParasiteThingBuilder implements Builder { /** * Creates new {@link MulticellularParasite} instance. */ @@ -34,7 +38,7 @@ public MulticellularParasite build() { } } public interface Builder extends ThingBuilder { - + } protected MulticellularParasite() { diff --git a/src/main/java/org/schema/Muscle.java b/src/main/java/org/schema/Muscle.java index 67bcb771..76f33476 100644 --- a/src/main/java/org/schema/Muscle.java +++ b/src/main/java/org/schema/Muscle.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A muscle is an anatomical structure consisting of a contractile form of tissue that animals use to effect movement. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -62,7 +66,7 @@ public AnatomicalStructure getOrigin() { /** * Builder for {@link Muscle} */ - public static final class MuscleThingBuilder implements Builder { + static final class MuscleThingBuilder implements Builder { /** * Creates new {@link Muscle} instance. */ @@ -72,264 +76,264 @@ public Muscle build() { /** * The movement the muscle generates. */ - public Builder muscleAction(String muscleAction) { + @NotNull public Builder muscleAction(String muscleAction) { this.muscleAction = muscleAction; return this; } /** * The muscle whose action counteracts the specified muscle. */ - public Builder antagonist(Muscle muscle) { + @NotNull public Builder antagonist(Muscle muscle) { this.antagonist = muscle; return this; } /** * The muscle whose action counteracts the specified muscle. */ - public Builder antagonist(Muscle.Builder muscle) { + @NotNull public Builder antagonist(Muscle.Builder muscle) { return this.antagonist(muscle.build()); } /** * The blood vessel that carries blood from the heart to the muscle. */ - public Builder bloodSupply(Vessel vessel) { + @NotNull public Builder bloodSupply(Vessel vessel) { this.bloodSupply = vessel; return this; } /** * The blood vessel that carries blood from the heart to the muscle. */ - public Builder bloodSupply(Vessel.Builder vessel) { + @NotNull public Builder bloodSupply(Vessel.Builder vessel) { return this.bloodSupply(vessel.build()); } /** * The place of attachment of a muscle, or what the muscle moves. */ - public Builder insertion(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder insertion(AnatomicalStructure anatomicalStructure) { this.insertion = anatomicalStructure; return this; } /** * The place of attachment of a muscle, or what the muscle moves. */ - public Builder insertion(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder insertion(AnatomicalStructure.Builder anatomicalStructure) { return this.insertion(anatomicalStructure.build()); } /** * The underlying innervation associated with the muscle. */ - public Builder nerve(Nerve nerve) { + @NotNull public Builder nerve(Nerve nerve) { this.nerve = nerve; return this; } /** * The underlying innervation associated with the muscle. */ - public Builder nerve(Nerve.Builder nerve) { + @NotNull public Builder nerve(Nerve.Builder nerve) { return this.nerve(nerve.build()); } /** * The place or point where a muscle arises. */ - public Builder origin(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder origin(AnatomicalStructure anatomicalStructure) { this.origin = anatomicalStructure; return this; } /** * The place or point where a muscle arises. */ - public Builder origin(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder origin(AnatomicalStructure.Builder anatomicalStructure) { return this.origin(anatomicalStructure.build()); } /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -363,7 +367,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -398,7 +402,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -431,7 +435,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -439,38 +443,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -509,55 +513,55 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder muscleAction(String muscleAction); - Builder antagonist(Muscle muscle); - Builder antagonist(Muscle.Builder muscle); - Builder bloodSupply(Vessel vessel); - Builder bloodSupply(Vessel.Builder vessel); - Builder insertion(AnatomicalStructure anatomicalStructure); - Builder insertion(AnatomicalStructure.Builder anatomicalStructure); - Builder nerve(Nerve nerve); - Builder nerve(Nerve.Builder nerve); - Builder origin(AnatomicalStructure anatomicalStructure); - Builder origin(AnatomicalStructure.Builder anatomicalStructure); - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder muscleAction(String muscleAction); + @NotNull Builder antagonist(Muscle muscle); + @NotNull Builder antagonist(Muscle.Builder muscle); + @NotNull Builder bloodSupply(Vessel vessel); + @NotNull Builder bloodSupply(Vessel.Builder vessel); + @NotNull Builder insertion(AnatomicalStructure anatomicalStructure); + @NotNull Builder insertion(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder nerve(Nerve nerve); + @NotNull Builder nerve(Nerve.Builder nerve); + @NotNull Builder origin(AnatomicalStructure anatomicalStructure); + @NotNull Builder origin(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Muscle(String muscleAction, Muscle antagonist, Vessel bloodSupply, AnatomicalStructure insertion, Nerve nerve, AnatomicalStructure origin, 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) { diff --git a/src/main/java/org/schema/Musculoskeletal.java b/src/main/java/org/schema/Musculoskeletal.java index 5b5d42ab..81c35e11 100644 --- a/src/main/java/org/schema/Musculoskeletal.java +++ b/src/main/java/org/schema/Musculoskeletal.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to diagnosis and treatment of disorders of muscles, ligaments and skeletal system. */ @@ -25,7 +29,7 @@ public class Musculoskeletal { /** * Builder for {@link Musculoskeletal} */ - public static final class MusculoskeletalThingBuilder implements Builder { + static final class MusculoskeletalThingBuilder implements Builder { /** * Creates new {@link Musculoskeletal} instance. */ @@ -34,7 +38,7 @@ public Musculoskeletal build() { } } public interface Builder extends ThingBuilder { - + } protected Musculoskeletal() { diff --git a/src/main/java/org/schema/MusculoskeletalExam.java b/src/main/java/org/schema/MusculoskeletalExam.java index 42eaabdc..109cb065 100644 --- a/src/main/java/org/schema/MusculoskeletalExam.java +++ b/src/main/java/org/schema/MusculoskeletalExam.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Musculoskeletal. */ @@ -25,7 +29,7 @@ public class MusculoskeletalExam { /** * Builder for {@link MusculoskeletalExam} */ - public static final class MusculoskeletalExamThingBuilder implements Builder { + static final class MusculoskeletalExamThingBuilder implements Builder { /** * Creates new {@link MusculoskeletalExam} instance. */ @@ -34,7 +38,7 @@ public MusculoskeletalExam build() { } } public interface Builder extends ThingBuilder { - + } protected MusculoskeletalExam() { diff --git a/src/main/java/org/schema/Museum.java b/src/main/java/org/schema/Museum.java index f5cbbff4..1ef653d9 100644 --- a/src/main/java/org/schema/Museum.java +++ b/src/main/java/org/schema/Museum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A museum. */ @@ -25,7 +29,7 @@ public class Museum extends CivicStructure { /** * Builder for {@link Museum} */ - public static final class MuseumThingBuilder implements Builder { + static final class MuseumThingBuilder implements Builder { /** * Creates new {@link Museum} instance. */ @@ -35,73 +39,73 @@ public Museum build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MusicAlbum.java b/src/main/java/org/schema/MusicAlbum.java index 96ad0814..53df3c85 100644 --- a/src/main/java/org/schema/MusicAlbum.java +++ b/src/main/java/org/schema/MusicAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A collection of music tracks. */ @@ -49,7 +53,7 @@ public MusicRelease getAlbumRelease() { /** * Builder for {@link MusicAlbum} */ - public static final class MusicAlbumThingBuilder implements Builder { + static final class MusicAlbumThingBuilder implements Builder { /** * Creates new {@link MusicAlbum} instance. */ @@ -59,66 +63,66 @@ public MusicAlbum build() { /** * The artist that performed this album or recording. */ - public Builder byArtist(MusicGroup musicGroup) { + @NotNull public Builder byArtist(MusicGroup musicGroup) { this.byArtist = musicGroup; return this; } /** * The artist that performed this album or recording. */ - public Builder byArtist(MusicGroup.Builder musicGroup) { + @NotNull public Builder byArtist(MusicGroup.Builder musicGroup) { return this.byArtist(musicGroup.build()); } /** * Classification of the album by it's type of content: soundtrack, live album, studio album, etc. */ - public Builder albumProductionType(MusicAlbumProductionType musicAlbumProductionType) { + @NotNull public Builder albumProductionType(MusicAlbumProductionType musicAlbumProductionType) { this.albumProductionType = musicAlbumProductionType; return this; } /** * Classification of the album by it's type of content: soundtrack, live album, studio album, etc. */ - public Builder albumProductionType(MusicAlbumProductionType.Builder musicAlbumProductionType) { + @NotNull public Builder albumProductionType(MusicAlbumProductionType.Builder musicAlbumProductionType) { return this.albumProductionType(musicAlbumProductionType.build()); } /** * The kind of release which this album is: single, EP or album. */ - public Builder albumReleaseType(MusicAlbumReleaseType musicAlbumReleaseType) { + @NotNull public Builder albumReleaseType(MusicAlbumReleaseType musicAlbumReleaseType) { this.albumReleaseType = musicAlbumReleaseType; return this; } /** * The kind of release which this album is: single, EP or album. */ - public Builder albumReleaseType(MusicAlbumReleaseType.Builder musicAlbumReleaseType) { + @NotNull public Builder albumReleaseType(MusicAlbumReleaseType.Builder musicAlbumReleaseType) { return this.albumReleaseType(musicAlbumReleaseType.build()); } /** * A release of this album. */ - public Builder albumRelease(MusicRelease musicRelease) { + @NotNull public Builder albumRelease(MusicRelease musicRelease) { this.albumRelease = musicRelease; return this; } /** * A release of this album. */ - public Builder albumRelease(MusicRelease.Builder musicRelease) { + @NotNull public Builder albumRelease(MusicRelease.Builder musicRelease) { return this.albumRelease(musicRelease.build()); } /** * The number of tracks in this album or playlist. */ - public Builder numTracks(Integer integer) { - this.numTracks = integer; + @NotNull public Builder numTracks(int numTracks) { + this.numTracks = numTracks; return this; } /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(ItemList itemList) { + @NotNull public Builder track(ItemList itemList) { if (this.track == null) this.track = new ItemListOrMusicRecording(); this.track.setItemList(itemList); return this; @@ -126,13 +130,13 @@ public Builder track(ItemList itemList) { /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(ItemList.Builder itemList) { + @NotNull public Builder track(ItemList.Builder itemList) { return this.track(itemList.build()); } /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(MusicRecording musicRecording) { + @NotNull public Builder track(MusicRecording musicRecording) { if (this.track == null) this.track = new ItemListOrMusicRecording(); this.track.setMusicRecording(musicRecording); return this; @@ -140,133 +144,133 @@ public Builder track(MusicRecording musicRecording) { /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(MusicRecording.Builder musicRecording) { + @NotNull public Builder track(MusicRecording.Builder musicRecording) { return this.track(musicRecording.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -274,13 +278,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -288,20 +292,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -309,13 +313,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -323,40 +327,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -364,13 +368,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -378,13 +382,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -392,13 +396,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -406,21 +410,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -428,7 +432,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -436,7 +440,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -444,7 +448,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -452,7 +456,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -460,13 +464,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -474,101 +478,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -576,13 +580,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -590,35 +594,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -626,13 +630,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -640,53 +644,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -694,13 +698,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -708,127 +712,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -836,7 +840,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -844,7 +848,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -852,7 +856,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -860,20 +864,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -881,13 +885,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -895,66 +899,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -962,13 +966,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -976,40 +980,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1043,7 +1047,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1078,7 +1082,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1111,7 +1115,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1119,38 +1123,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1161,7 +1165,7 @@ public Builder id(long id) { private MusicAlbumProductionType albumProductionType; private MusicAlbumReleaseType albumReleaseType; private MusicRelease albumRelease; - private Integer numTracks; + private int numTracks; private ItemListOrMusicRecording track; private String schemaVersion; private Thing about; @@ -1219,7 +1223,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1237,157 +1241,157 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder byArtist(MusicGroup musicGroup); - Builder byArtist(MusicGroup.Builder musicGroup); - Builder albumProductionType(MusicAlbumProductionType musicAlbumProductionType); - Builder albumProductionType(MusicAlbumProductionType.Builder musicAlbumProductionType); - Builder albumReleaseType(MusicAlbumReleaseType musicAlbumReleaseType); - Builder albumReleaseType(MusicAlbumReleaseType.Builder musicAlbumReleaseType); - Builder albumRelease(MusicRelease musicRelease); - Builder albumRelease(MusicRelease.Builder musicRelease); - Builder numTracks(Integer integer); - Builder track(ItemList itemList); - Builder track(ItemList.Builder itemList); - Builder track(MusicRecording musicRecording); - Builder track(MusicRecording.Builder musicRecording); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder byArtist(MusicGroup musicGroup); + @NotNull Builder byArtist(MusicGroup.Builder musicGroup); + @NotNull Builder albumProductionType(MusicAlbumProductionType musicAlbumProductionType); + @NotNull Builder albumProductionType(MusicAlbumProductionType.Builder musicAlbumProductionType); + @NotNull Builder albumReleaseType(MusicAlbumReleaseType musicAlbumReleaseType); + @NotNull Builder albumReleaseType(MusicAlbumReleaseType.Builder musicAlbumReleaseType); + @NotNull Builder albumRelease(MusicRelease musicRelease); + @NotNull Builder albumRelease(MusicRelease.Builder musicRelease); + @NotNull Builder numTracks(int numTracks); + @NotNull Builder track(ItemList itemList); + @NotNull Builder track(ItemList.Builder itemList); + @NotNull Builder track(MusicRecording musicRecording); + @NotNull Builder track(MusicRecording.Builder musicRecording); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MusicAlbum(MusicGroup byArtist, MusicAlbumProductionType albumProductionType, MusicAlbumReleaseType albumReleaseType, MusicRelease albumRelease, Integer numTracks, ItemListOrMusicRecording track, 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) { + protected MusicAlbum(MusicGroup byArtist, MusicAlbumProductionType albumProductionType, MusicAlbumReleaseType albumReleaseType, MusicRelease albumRelease, int numTracks, ItemListOrMusicRecording track, 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, int 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(numTracks, track, 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); myByArtist = byArtist; myAlbumProductionType = albumProductionType; diff --git a/src/main/java/org/schema/MusicAlbumProductionType.java b/src/main/java/org/schema/MusicAlbumProductionType.java index 0e1af438..2fe1d4e7 100644 --- a/src/main/java/org/schema/MusicAlbumProductionType.java +++ b/src/main/java/org/schema/MusicAlbumProductionType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Classification of the album by it's type of content: soundtrack, live album, studio album, etc. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class MusicAlbumProductionType extends Enumeration { /** * Builder for {@link MusicAlbumProductionType} */ - public static final class MusicAlbumProductionTypeThingBuilder implements Builder { + static final class MusicAlbumProductionTypeThingBuilder implements Builder { /** * Creates new {@link MusicAlbumProductionType} instance. */ @@ -36,7 +40,7 @@ public MusicAlbumProductionType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MusicAlbumProductionType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MusicAlbumReleaseType.java b/src/main/java/org/schema/MusicAlbumReleaseType.java index d569e067..3a3cedb8 100644 --- a/src/main/java/org/schema/MusicAlbumReleaseType.java +++ b/src/main/java/org/schema/MusicAlbumReleaseType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The kind of release which this album is: single, EP or album. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class MusicAlbumReleaseType extends Enumeration { /** * Builder for {@link MusicAlbumReleaseType} */ - public static final class MusicAlbumReleaseTypeThingBuilder implements Builder { + static final class MusicAlbumReleaseTypeThingBuilder implements Builder { /** * Creates new {@link MusicAlbumReleaseType} instance. */ @@ -36,7 +40,7 @@ public MusicAlbumReleaseType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MusicAlbumReleaseType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MusicComposition.java b/src/main/java/org/schema/MusicComposition.java index c1ededfd..842e7b64 100644 --- a/src/main/java/org/schema/MusicComposition.java +++ b/src/main/java/org/schema/MusicComposition.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A musical composition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -80,7 +84,7 @@ public MusicRecording getRecordedAs() { /** * Builder for {@link MusicComposition} */ - public static final class MusicCompositionThingBuilder implements Builder { + static final class MusicCompositionThingBuilder implements Builder { /** * Creates new {@link MusicComposition} instance. */ @@ -90,20 +94,20 @@ public MusicComposition build() { /** * An arrangement derived from the composition. */ - public Builder musicArrangement(MusicComposition musicComposition) { + @NotNull public Builder musicArrangement(MusicComposition musicComposition) { this.musicArrangement = musicComposition; return this; } /** * An arrangement derived from the composition. */ - public Builder musicArrangement(MusicComposition.Builder musicComposition) { + @NotNull public Builder musicArrangement(MusicComposition.Builder musicComposition) { return this.musicArrangement(musicComposition.build()); } /** * The person or organization who wrote the composition. */ - public Builder composer(Organization organization) { + @NotNull public Builder composer(Organization organization) { if (this.composer == null) this.composer = new OrganizationOrPerson(); this.composer.setOrganization(organization); return this; @@ -111,13 +115,13 @@ public Builder composer(Organization organization) { /** * The person or organization who wrote the composition. */ - public Builder composer(Organization.Builder organization) { + @NotNull public Builder composer(Organization.Builder organization) { return this.composer(organization.build()); } /** * The person or organization who wrote the composition. */ - public Builder composer(Person person) { + @NotNull public Builder composer(Person person) { if (this.composer == null) this.composer = new OrganizationOrPerson(); this.composer.setPerson(person); return this; @@ -125,206 +129,206 @@ public Builder composer(Person person) { /** * The person or organization who wrote the composition. */ - public Builder composer(Person.Builder person) { + @NotNull public Builder composer(Person.Builder person) { return this.composer(person.build()); } /** * The date and place the work was first performed. */ - public Builder firstPerformance(Event event) { + @NotNull public Builder firstPerformance(Event event) { this.firstPerformance = event; return this; } /** * The date and place the work was first performed. */ - public Builder firstPerformance(Event.Builder event) { + @NotNull public Builder firstPerformance(Event.Builder event) { return this.firstPerformance(event.build()); } /** * Smaller compositions included in this work (e.g. a movement in a symphony). */ - public Builder includedComposition(MusicComposition musicComposition) { + @NotNull public Builder includedComposition(MusicComposition musicComposition) { this.includedComposition = musicComposition; return this; } /** * Smaller compositions included in this work (e.g. a movement in a symphony). */ - public Builder includedComposition(MusicComposition.Builder musicComposition) { + @NotNull public Builder includedComposition(MusicComposition.Builder musicComposition) { return this.includedComposition(musicComposition.build()); } /** * The International Standard Musical Work Code for the composition. */ - public Builder iswcCode(String iswcCode) { + @NotNull public Builder iswcCode(String iswcCode) { this.iswcCode = iswcCode; return this; } /** * The person who wrote the words. */ - public Builder lyricist(Person person) { + @NotNull public Builder lyricist(Person person) { this.lyricist = person; return this; } /** * The person who wrote the words. */ - public Builder lyricist(Person.Builder person) { + @NotNull public Builder lyricist(Person.Builder person) { return this.lyricist(person.build()); } /** * The type of composition (e.g. overture, sonata, symphony, etc.). */ - public Builder musicCompositionForm(String musicCompositionForm) { + @NotNull public Builder musicCompositionForm(String musicCompositionForm) { this.musicCompositionForm = musicCompositionForm; return this; } /** * The key, mode, or scale this composition uses. */ - public Builder musicalKey(String musicalKey) { + @NotNull public Builder musicalKey(String musicalKey) { this.musicalKey = musicalKey; return this; } /** * An audio recording of the work. */ - public Builder recordedAs(MusicRecording musicRecording) { + @NotNull public Builder recordedAs(MusicRecording musicRecording) { this.recordedAs = musicRecording; return this; } /** * An audio recording of the work. */ - public Builder recordedAs(MusicRecording.Builder musicRecording) { + @NotNull public Builder recordedAs(MusicRecording.Builder musicRecording) { return this.recordedAs(musicRecording.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -332,13 +336,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -346,20 +350,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -367,13 +371,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -381,40 +385,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -422,13 +426,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -436,13 +440,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -450,13 +454,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -464,21 +468,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -486,7 +490,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -494,7 +498,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -502,7 +506,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -510,7 +514,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -518,13 +522,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -532,101 +536,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -634,13 +638,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -648,35 +652,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -684,13 +688,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -698,53 +702,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -752,13 +756,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -766,127 +770,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -894,7 +898,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -902,7 +906,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -910,7 +914,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -918,20 +922,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -939,13 +943,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -953,66 +957,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1020,13 +1024,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1034,40 +1038,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1101,7 +1105,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1136,7 +1140,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1169,7 +1173,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1177,38 +1181,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1280,7 +1284,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1298,161 +1302,161 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder musicArrangement(MusicComposition musicComposition); - Builder musicArrangement(MusicComposition.Builder musicComposition); - Builder composer(Organization organization); - Builder composer(Organization.Builder organization); - Builder composer(Person person); - Builder composer(Person.Builder person); - Builder firstPerformance(Event event); - Builder firstPerformance(Event.Builder event); - Builder includedComposition(MusicComposition musicComposition); - Builder includedComposition(MusicComposition.Builder musicComposition); - Builder iswcCode(String iswcCode); - Builder lyricist(Person person); - Builder lyricist(Person.Builder person); - Builder musicCompositionForm(String musicCompositionForm); - Builder musicalKey(String musicalKey); - Builder recordedAs(MusicRecording musicRecording); - Builder recordedAs(MusicRecording.Builder musicRecording); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder musicArrangement(MusicComposition musicComposition); + @NotNull Builder musicArrangement(MusicComposition.Builder musicComposition); + @NotNull Builder composer(Organization organization); + @NotNull Builder composer(Organization.Builder organization); + @NotNull Builder composer(Person person); + @NotNull Builder composer(Person.Builder person); + @NotNull Builder firstPerformance(Event event); + @NotNull Builder firstPerformance(Event.Builder event); + @NotNull Builder includedComposition(MusicComposition musicComposition); + @NotNull Builder includedComposition(MusicComposition.Builder musicComposition); + @NotNull Builder iswcCode(String iswcCode); + @NotNull Builder lyricist(Person person); + @NotNull Builder lyricist(Person.Builder person); + @NotNull Builder musicCompositionForm(String musicCompositionForm); + @NotNull Builder musicalKey(String musicalKey); + @NotNull Builder recordedAs(MusicRecording musicRecording); + @NotNull Builder recordedAs(MusicRecording.Builder musicRecording); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MusicComposition(MusicComposition musicArrangement, OrganizationOrPerson composer, Event firstPerformance, MusicComposition includedComposition, String iswcCode, Person lyricist, String musicCompositionForm, String musicalKey, MusicRecording recordedAs, 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) { + protected MusicComposition(MusicComposition musicArrangement, OrganizationOrPerson composer, Event firstPerformance, MusicComposition includedComposition, String iswcCode, Person lyricist, String musicCompositionForm, String musicalKey, MusicRecording recordedAs, 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, int 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); myMusicArrangement = musicArrangement; myComposer = composer; diff --git a/src/main/java/org/schema/MusicEvent.java b/src/main/java/org/schema/MusicEvent.java index 5051f104..5d4c4c2f 100644 --- a/src/main/java/org/schema/MusicEvent.java +++ b/src/main/java/org/schema/MusicEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Music event. */ @@ -25,7 +29,7 @@ public class MusicEvent extends Event { /** * Builder for {@link MusicEvent} */ - public static final class MusicEventThingBuilder implements Builder { + static final class MusicEventThingBuilder implements Builder { /** * Creates new {@link MusicEvent} instance. */ @@ -35,20 +39,20 @@ public MusicEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MusicGroup.java b/src/main/java/org/schema/MusicGroup.java index 3761d083..c7dfb618 100644 --- a/src/main/java/org/schema/MusicGroup.java +++ b/src/main/java/org/schema/MusicGroup.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A musical group, such as a band, an orchestra, or a choir. Can also be a solo musician. */ @@ -43,7 +47,7 @@ public String getGenre() { /** * Builder for {@link MusicGroup} */ - public static final class MusicGroupThingBuilder implements Builder { + static final class MusicGroupThingBuilder implements Builder { /** * Creates new {@link MusicGroup} instance. */ @@ -53,20 +57,20 @@ public MusicGroup build() { /** * A music album. */ - public Builder album(MusicAlbum musicAlbum) { + @NotNull public Builder album(MusicAlbum musicAlbum) { this.album = musicAlbum; return this; } /** * A music album. */ - public Builder album(MusicAlbum.Builder musicAlbum) { + @NotNull public Builder album(MusicAlbum.Builder musicAlbum) { return this.album(musicAlbum.build()); } /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(ItemList itemList) { + @NotNull public Builder track(ItemList itemList) { if (this.track == null) this.track = new ItemListOrMusicRecording(); this.track.setItemList(itemList); return this; @@ -74,13 +78,13 @@ public Builder track(ItemList itemList) { /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(ItemList.Builder itemList) { + @NotNull public Builder track(ItemList.Builder itemList) { return this.track(itemList.build()); } /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(MusicRecording musicRecording) { + @NotNull public Builder track(MusicRecording musicRecording) { if (this.track == null) this.track = new ItemListOrMusicRecording(); this.track.setMusicRecording(musicRecording); return this; @@ -88,53 +92,53 @@ public Builder track(MusicRecording musicRecording) { /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(MusicRecording.Builder musicRecording) { + @NotNull public Builder track(MusicRecording.Builder musicRecording) { return this.track(musicRecording.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -142,13 +146,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -156,147 +160,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -304,13 +308,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -318,20 +322,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -339,13 +343,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -353,13 +357,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -367,13 +371,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -381,33 +385,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -415,13 +419,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -429,100 +433,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -556,7 +560,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -591,7 +595,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -624,7 +628,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -632,38 +636,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -716,85 +720,85 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder album(MusicAlbum musicAlbum); - Builder album(MusicAlbum.Builder musicAlbum); - Builder track(ItemList itemList); - Builder track(ItemList.Builder itemList); - Builder track(MusicRecording musicRecording); - Builder track(MusicRecording.Builder musicRecording); - Builder genre(String genre); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder album(MusicAlbum musicAlbum); + @NotNull Builder album(MusicAlbum.Builder musicAlbum); + @NotNull Builder track(ItemList itemList); + @NotNull Builder track(ItemList.Builder itemList); + @NotNull Builder track(MusicRecording musicRecording); + @NotNull Builder track(MusicRecording.Builder musicRecording); + @NotNull Builder genre(String genre); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MusicGroup(MusicAlbum album, ItemListOrMusicRecording track, String genre, 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) { diff --git a/src/main/java/org/schema/MusicGroupOrPerson.java b/src/main/java/org/schema/MusicGroupOrPerson.java index b8ea9b01..08f378ae 100644 --- a/src/main/java/org/schema/MusicGroupOrPerson.java +++ b/src/main/java/org/schema/MusicGroupOrPerson.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class MusicGroupOrPerson { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myMusicGroup != null) return myMusicGroup; if (myPerson != null) return myPerson; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setMusicGroup(MusicGroup musicGroup) { clear(); myMusicGroup = musicGroup; } public MusicGroup getMusicGroup() { return myMusicGroup; } - private MusicGroup myMusicGroup; public void setPerson(Person person) { clear(); myPerson = person; } public Person getPerson() { return myPerson; } + private MusicGroup myMusicGroup; private Person myPerson; private void clear() { myMusicGroup = null; diff --git a/src/main/java/org/schema/MusicPlaylist.java b/src/main/java/org/schema/MusicPlaylist.java index 0ea8ed78..f345c7c6 100644 --- a/src/main/java/org/schema/MusicPlaylist.java +++ b/src/main/java/org/schema/MusicPlaylist.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A collection of music tracks in playlist form. */ @@ -25,7 +29,7 @@ public class MusicPlaylist extends CreativeWork { /** * The number of tracks in this album or playlist. */ - public Integer getNumTracks() { + public int getNumTracks() { return myNumTracks; } /** @@ -37,7 +41,7 @@ public ItemListOrMusicRecording getTrack() { /** * Builder for {@link MusicPlaylist} */ - public static final class MusicPlaylistThingBuilder implements Builder { + static final class MusicPlaylistThingBuilder implements Builder { /** * Creates new {@link MusicPlaylist} instance. */ @@ -47,14 +51,14 @@ public MusicPlaylist build() { /** * The number of tracks in this album or playlist. */ - public Builder numTracks(Integer integer) { - this.numTracks = integer; + @NotNull public Builder numTracks(int numTracks) { + this.numTracks = numTracks; return this; } /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(ItemList itemList) { + @NotNull public Builder track(ItemList itemList) { if (this.track == null) this.track = new ItemListOrMusicRecording(); this.track.setItemList(itemList); return this; @@ -62,13 +66,13 @@ public Builder track(ItemList itemList) { /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(ItemList.Builder itemList) { + @NotNull public Builder track(ItemList.Builder itemList) { return this.track(itemList.build()); } /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(MusicRecording musicRecording) { + @NotNull public Builder track(MusicRecording musicRecording) { if (this.track == null) this.track = new ItemListOrMusicRecording(); this.track.setMusicRecording(musicRecording); return this; @@ -76,133 +80,133 @@ public Builder track(MusicRecording musicRecording) { /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(MusicRecording.Builder musicRecording) { + @NotNull public Builder track(MusicRecording.Builder musicRecording) { return this.track(musicRecording.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -210,13 +214,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -224,20 +228,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -245,13 +249,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -259,40 +263,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -300,13 +304,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -314,13 +318,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -328,13 +332,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -342,21 +346,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -364,7 +368,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -372,7 +376,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -380,7 +384,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -388,7 +392,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -396,13 +400,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -410,101 +414,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -512,13 +516,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -526,35 +530,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -562,13 +566,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -576,53 +580,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -630,13 +634,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -644,127 +648,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -772,7 +776,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -780,7 +784,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -788,7 +792,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -796,20 +800,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -817,13 +821,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -831,66 +835,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -898,13 +902,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -912,40 +916,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -979,7 +983,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1014,7 +1018,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1047,7 +1051,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1055,45 +1059,45 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private Integer numTracks; + private int numTracks; private ItemListOrMusicRecording track; private String schemaVersion; private Thing about; @@ -1151,7 +1155,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1169,153 +1173,153 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder numTracks(Integer integer); - Builder track(ItemList itemList); - Builder track(ItemList.Builder itemList); - Builder track(MusicRecording musicRecording); - Builder track(MusicRecording.Builder musicRecording); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder numTracks(int numTracks); + @NotNull Builder track(ItemList itemList); + @NotNull Builder track(ItemList.Builder itemList); + @NotNull Builder track(MusicRecording musicRecording); + @NotNull Builder track(MusicRecording.Builder musicRecording); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MusicPlaylist(Integer numTracks, ItemListOrMusicRecording track, 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) { + protected MusicPlaylist(int numTracks, ItemListOrMusicRecording track, 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, int 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); myNumTracks = numTracks; myTrack = track; } - private Integer myNumTracks; + private int myNumTracks; private ItemListOrMusicRecording myTrack; } diff --git a/src/main/java/org/schema/MusicRecording.java b/src/main/java/org/schema/MusicRecording.java index 7c3c12cc..45279278 100644 --- a/src/main/java/org/schema/MusicRecording.java +++ b/src/main/java/org/schema/MusicRecording.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A music recording (track), usually a single song. */ @@ -61,7 +65,7 @@ public MusicComposition getRecordingOf() { /** * Builder for {@link MusicRecording} */ - public static final class MusicRecordingThingBuilder implements Builder { + static final class MusicRecordingThingBuilder implements Builder { /** * Creates new {@link MusicRecording} instance. */ @@ -71,199 +75,199 @@ public MusicRecording build() { /** * The artist that performed this album or recording. */ - public Builder byArtist(MusicGroup musicGroup) { + @NotNull public Builder byArtist(MusicGroup musicGroup) { this.byArtist = musicGroup; return this; } /** * The artist that performed this album or recording. */ - public Builder byArtist(MusicGroup.Builder musicGroup) { + @NotNull public Builder byArtist(MusicGroup.Builder musicGroup) { return this.byArtist(musicGroup.build()); } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The album to which this recording belongs. */ - public Builder inAlbum(MusicAlbum musicAlbum) { + @NotNull public Builder inAlbum(MusicAlbum musicAlbum) { this.inAlbum = musicAlbum; return this; } /** * The album to which this recording belongs. */ - public Builder inAlbum(MusicAlbum.Builder musicAlbum) { + @NotNull public Builder inAlbum(MusicAlbum.Builder musicAlbum) { return this.inAlbum(musicAlbum.build()); } /** * The playlist to which this recording belongs. */ - public Builder inPlaylist(MusicPlaylist musicPlaylist) { + @NotNull public Builder inPlaylist(MusicPlaylist musicPlaylist) { this.inPlaylist = musicPlaylist; return this; } /** * The playlist to which this recording belongs. */ - public Builder inPlaylist(MusicPlaylist.Builder musicPlaylist) { + @NotNull public Builder inPlaylist(MusicPlaylist.Builder musicPlaylist) { return this.inPlaylist(musicPlaylist.build()); } /** * The International Standard Recording Code for the recording. */ - public Builder isrcCode(String isrcCode) { + @NotNull public Builder isrcCode(String isrcCode) { this.isrcCode = isrcCode; return this; } /** * The composition this track is a recording of. */ - public Builder recordingOf(MusicComposition musicComposition) { + @NotNull public Builder recordingOf(MusicComposition musicComposition) { this.recordingOf = musicComposition; return this; } /** * The composition this track is a recording of. */ - public Builder recordingOf(MusicComposition.Builder musicComposition) { + @NotNull public Builder recordingOf(MusicComposition.Builder musicComposition) { return this.recordingOf(musicComposition.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -271,13 +275,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -285,20 +289,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -306,13 +310,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -320,40 +324,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -361,13 +365,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -375,13 +379,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -389,13 +393,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -403,21 +407,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -425,7 +429,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -433,7 +437,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -441,7 +445,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -449,7 +453,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -457,13 +461,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -471,101 +475,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -573,13 +577,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -587,35 +591,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -623,13 +627,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -637,53 +641,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -691,13 +695,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -705,127 +709,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -833,7 +837,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -841,7 +845,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -849,7 +853,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -857,20 +861,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -878,13 +882,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -892,66 +896,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -959,13 +963,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -973,40 +977,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1040,7 +1044,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1075,7 +1079,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1108,7 +1112,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1116,38 +1120,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1216,7 +1220,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1234,155 +1238,155 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder byArtist(MusicGroup musicGroup); - Builder byArtist(MusicGroup.Builder musicGroup); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder inAlbum(MusicAlbum musicAlbum); - Builder inAlbum(MusicAlbum.Builder musicAlbum); - Builder inPlaylist(MusicPlaylist musicPlaylist); - Builder inPlaylist(MusicPlaylist.Builder musicPlaylist); - Builder isrcCode(String isrcCode); - Builder recordingOf(MusicComposition musicComposition); - Builder recordingOf(MusicComposition.Builder musicComposition); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder byArtist(MusicGroup musicGroup); + @NotNull Builder byArtist(MusicGroup.Builder musicGroup); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder inAlbum(MusicAlbum musicAlbum); + @NotNull Builder inAlbum(MusicAlbum.Builder musicAlbum); + @NotNull Builder inPlaylist(MusicPlaylist musicPlaylist); + @NotNull Builder inPlaylist(MusicPlaylist.Builder musicPlaylist); + @NotNull Builder isrcCode(String isrcCode); + @NotNull Builder recordingOf(MusicComposition musicComposition); + @NotNull Builder recordingOf(MusicComposition.Builder musicComposition); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MusicRecording(MusicGroup byArtist, Duration duration, MusicAlbum inAlbum, MusicPlaylist inPlaylist, String isrcCode, MusicComposition recordingOf, 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) { + protected MusicRecording(MusicGroup byArtist, Duration duration, MusicAlbum inAlbum, MusicPlaylist inPlaylist, String isrcCode, MusicComposition recordingOf, 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, int 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); myByArtist = byArtist; myDuration = duration; diff --git a/src/main/java/org/schema/MusicRelease.java b/src/main/java/org/schema/MusicRelease.java index 1dcb2037..c165db73 100644 --- a/src/main/java/org/schema/MusicRelease.java +++ b/src/main/java/org/schema/MusicRelease.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A MusicRelease is a specific release of a music album. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -62,7 +66,7 @@ public MusicAlbum getReleaseOf() { /** * Builder for {@link MusicRelease} */ - public static final class MusicReleaseThingBuilder implements Builder { + static final class MusicReleaseThingBuilder implements Builder { /** * Creates new {@link MusicRelease} instance. */ @@ -72,14 +76,14 @@ public MusicRelease build() { /** * The catalog number for the release. */ - public Builder catalogNumber(String catalogNumber) { + @NotNull public Builder catalogNumber(String catalogNumber) { this.catalogNumber = catalogNumber; return this; } /** * The group the release is credited to if different than the byArtist. For example, Red and Blue is credited to "Stefani Germanotta Band", but by Lady Gaga. */ - public Builder creditedTo(Organization organization) { + @NotNull public Builder creditedTo(Organization organization) { if (this.creditedTo == null) this.creditedTo = new OrganizationOrPerson(); this.creditedTo.setOrganization(organization); return this; @@ -87,13 +91,13 @@ public Builder creditedTo(Organization organization) { /** * The group the release is credited to if different than the byArtist. For example, Red and Blue is credited to "Stefani Germanotta Band", but by Lady Gaga. */ - public Builder creditedTo(Organization.Builder organization) { + @NotNull public Builder creditedTo(Organization.Builder organization) { return this.creditedTo(organization.build()); } /** * The group the release is credited to if different than the byArtist. For example, Red and Blue is credited to "Stefani Germanotta Band", but by Lady Gaga. */ - public Builder creditedTo(Person person) { + @NotNull public Builder creditedTo(Person person) { if (this.creditedTo == null) this.creditedTo = new OrganizationOrPerson(); this.creditedTo.setPerson(person); return this; @@ -101,72 +105,72 @@ public Builder creditedTo(Person person) { /** * The group the release is credited to if different than the byArtist. For example, Red and Blue is credited to "Stefani Germanotta Band", but by Lady Gaga. */ - public Builder creditedTo(Person.Builder person) { + @NotNull public Builder creditedTo(Person.Builder person) { return this.creditedTo(person.build()); } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * Format of this release (the type of recording media used, ie. compact disc, digital media, LP, etc.). */ - public Builder musicReleaseFormat(MusicReleaseFormatType musicReleaseFormatType) { + @NotNull public Builder musicReleaseFormat(MusicReleaseFormatType musicReleaseFormatType) { this.musicReleaseFormat = musicReleaseFormatType; return this; } /** * Format of this release (the type of recording media used, ie. compact disc, digital media, LP, etc.). */ - public Builder musicReleaseFormat(MusicReleaseFormatType.Builder musicReleaseFormatType) { + @NotNull public Builder musicReleaseFormat(MusicReleaseFormatType.Builder musicReleaseFormatType) { return this.musicReleaseFormat(musicReleaseFormatType.build()); } /** * The label that issued the release. */ - public Builder recordLabel(Organization organization) { + @NotNull public Builder recordLabel(Organization organization) { this.recordLabel = organization; return this; } /** * The label that issued the release. */ - public Builder recordLabel(Organization.Builder organization) { + @NotNull public Builder recordLabel(Organization.Builder organization) { return this.recordLabel(organization.build()); } /** * The album this is a release of. */ - public Builder releaseOf(MusicAlbum musicAlbum) { + @NotNull public Builder releaseOf(MusicAlbum musicAlbum) { this.releaseOf = musicAlbum; return this; } /** * The album this is a release of. */ - public Builder releaseOf(MusicAlbum.Builder musicAlbum) { + @NotNull public Builder releaseOf(MusicAlbum.Builder musicAlbum) { return this.releaseOf(musicAlbum.build()); } /** * The number of tracks in this album or playlist. */ - public Builder numTracks(Integer integer) { - this.numTracks = integer; + @NotNull public Builder numTracks(int numTracks) { + this.numTracks = numTracks; return this; } /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(ItemList itemList) { + @NotNull public Builder track(ItemList itemList) { if (this.track == null) this.track = new ItemListOrMusicRecording(); this.track.setItemList(itemList); return this; @@ -174,13 +178,13 @@ public Builder track(ItemList itemList) { /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(ItemList.Builder itemList) { + @NotNull public Builder track(ItemList.Builder itemList) { return this.track(itemList.build()); } /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(MusicRecording musicRecording) { + @NotNull public Builder track(MusicRecording musicRecording) { if (this.track == null) this.track = new ItemListOrMusicRecording(); this.track.setMusicRecording(musicRecording); return this; @@ -188,133 +192,133 @@ public Builder track(MusicRecording musicRecording) { /** * A music recording (track)—usually a single song. If an ItemList is given, the list should contain items of type MusicRecording. */ - public Builder track(MusicRecording.Builder musicRecording) { + @NotNull public Builder track(MusicRecording.Builder musicRecording) { return this.track(musicRecording.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -322,13 +326,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -336,20 +340,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -357,13 +361,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -371,40 +375,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -412,13 +416,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -426,13 +430,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -440,13 +444,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -454,21 +458,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -476,7 +480,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -484,7 +488,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -492,7 +496,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -500,7 +504,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -508,13 +512,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -522,101 +526,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -624,13 +628,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -638,35 +642,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -674,13 +678,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -688,53 +692,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -742,13 +746,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -756,127 +760,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -884,7 +888,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -892,7 +896,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -900,7 +904,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -908,20 +912,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -929,13 +933,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -943,66 +947,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1010,13 +1014,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1024,40 +1028,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1091,7 +1095,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1126,7 +1130,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1159,7 +1163,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1167,38 +1171,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1211,7 +1215,7 @@ public Builder id(long id) { private MusicReleaseFormatType musicReleaseFormat; private Organization recordLabel; private MusicAlbum releaseOf; - private Integer numTracks; + private int numTracks; private ItemListOrMusicRecording track; private String schemaVersion; private Thing about; @@ -1269,7 +1273,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1287,162 +1291,162 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder catalogNumber(String catalogNumber); - Builder creditedTo(Organization organization); - Builder creditedTo(Organization.Builder organization); - Builder creditedTo(Person person); - Builder creditedTo(Person.Builder person); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder musicReleaseFormat(MusicReleaseFormatType musicReleaseFormatType); - Builder musicReleaseFormat(MusicReleaseFormatType.Builder musicReleaseFormatType); - Builder recordLabel(Organization organization); - Builder recordLabel(Organization.Builder organization); - Builder releaseOf(MusicAlbum musicAlbum); - Builder releaseOf(MusicAlbum.Builder musicAlbum); - Builder numTracks(Integer integer); - Builder track(ItemList itemList); - Builder track(ItemList.Builder itemList); - Builder track(MusicRecording musicRecording); - Builder track(MusicRecording.Builder musicRecording); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder catalogNumber(String catalogNumber); + @NotNull Builder creditedTo(Organization organization); + @NotNull Builder creditedTo(Organization.Builder organization); + @NotNull Builder creditedTo(Person person); + @NotNull Builder creditedTo(Person.Builder person); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder musicReleaseFormat(MusicReleaseFormatType musicReleaseFormatType); + @NotNull Builder musicReleaseFormat(MusicReleaseFormatType.Builder musicReleaseFormatType); + @NotNull Builder recordLabel(Organization organization); + @NotNull Builder recordLabel(Organization.Builder organization); + @NotNull Builder releaseOf(MusicAlbum musicAlbum); + @NotNull Builder releaseOf(MusicAlbum.Builder musicAlbum); + @NotNull Builder numTracks(int numTracks); + @NotNull Builder track(ItemList itemList); + @NotNull Builder track(ItemList.Builder itemList); + @NotNull Builder track(MusicRecording musicRecording); + @NotNull Builder track(MusicRecording.Builder musicRecording); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected MusicRelease(String catalogNumber, OrganizationOrPerson creditedTo, Duration duration, MusicReleaseFormatType musicReleaseFormat, Organization recordLabel, MusicAlbum releaseOf, Integer numTracks, ItemListOrMusicRecording track, 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) { + protected MusicRelease(String catalogNumber, OrganizationOrPerson creditedTo, Duration duration, MusicReleaseFormatType musicReleaseFormat, Organization recordLabel, MusicAlbum releaseOf, int numTracks, ItemListOrMusicRecording track, 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, int 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(numTracks, track, 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); myCatalogNumber = catalogNumber; myCreditedTo = creditedTo; diff --git a/src/main/java/org/schema/MusicReleaseFormatType.java b/src/main/java/org/schema/MusicReleaseFormatType.java index ddadc568..ac1dd6e0 100644 --- a/src/main/java/org/schema/MusicReleaseFormatType.java +++ b/src/main/java/org/schema/MusicReleaseFormatType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Format of this release (the type of recording media used, ie. compact disc, digital media, LP, etc.). * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class MusicReleaseFormatType extends Enumeration { /** * Builder for {@link MusicReleaseFormatType} */ - public static final class MusicReleaseFormatTypeThingBuilder implements Builder { + static final class MusicReleaseFormatTypeThingBuilder implements Builder { /** * Creates new {@link MusicReleaseFormatType} instance. */ @@ -36,7 +40,7 @@ public MusicReleaseFormatType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected MusicReleaseFormatType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/MusicStore.java b/src/main/java/org/schema/MusicStore.java index bf73ed29..3e0e0ff4 100644 --- a/src/main/java/org/schema/MusicStore.java +++ b/src/main/java/org/schema/MusicStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A music store. */ @@ -25,7 +29,7 @@ public class MusicStore extends Store { /** * Builder for {@link MusicStore} */ - public static final class MusicStoreThingBuilder implements Builder { + static final class MusicStoreThingBuilder implements Builder { /** * Creates new {@link MusicStore} instance. */ @@ -35,107 +39,107 @@ public MusicStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MusicVenue.java b/src/main/java/org/schema/MusicVenue.java index 8c79bac4..dc3e41a6 100644 --- a/src/main/java/org/schema/MusicVenue.java +++ b/src/main/java/org/schema/MusicVenue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A music venue. */ @@ -25,7 +29,7 @@ public class MusicVenue extends CivicStructure { /** * Builder for {@link MusicVenue} */ - public static final class MusicVenueThingBuilder implements Builder { + static final class MusicVenueThingBuilder implements Builder { /** * Creates new {@link MusicVenue} instance. */ @@ -35,73 +39,73 @@ public MusicVenue build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/MusicVideoObject.java b/src/main/java/org/schema/MusicVideoObject.java index cc2d9138..8e29d731 100644 --- a/src/main/java/org/schema/MusicVideoObject.java +++ b/src/main/java/org/schema/MusicVideoObject.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A music video file. */ @@ -25,7 +29,7 @@ public class MusicVideoObject extends MediaObject { /** * Builder for {@link MusicVideoObject} */ - public static final class MusicVideoObjectThingBuilder implements Builder { + static final class MusicVideoObjectThingBuilder implements Builder { /** * Creates new {@link MusicVideoObject} instance. */ @@ -35,88 +39,88 @@ public MusicVideoObject build() { /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle newsArticle) { this.associatedArticle = newsArticle; return this; } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle.Builder newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle.Builder newsArticle) { return this.associatedArticle(newsArticle.build()); } /** * The bitrate of the media object. */ - public Builder bitrate(String bitrate) { + @NotNull public Builder bitrate(String bitrate) { this.bitrate = bitrate; return this; } /** * File size in (mega/kilo) bytes. */ - public Builder contentSize(String contentSize) { + @NotNull public Builder contentSize(String contentSize) { this.contentSize = contentSize; return this; } /** * Actual bytes of the media object, for example the image file or video file. */ - public Builder contentUrl(String contentUrl) { + @NotNull public Builder contentUrl(String contentUrl) { this.contentUrl = contentUrl; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * A URL pointing to a player for a specific video. In general, this is the information in the src element of an embed tag and should not be the same as the content of the loc tag. */ - public Builder embedUrl(String embedUrl) { + @NotNull public Builder embedUrl(String embedUrl) { this.embedUrl = embedUrl; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork creativeWork) { this.encodesCreativeWork = creativeWork; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { return this.encodesCreativeWork(creativeWork.build()); } /** * mp3, mpeg4, etc. */ - public Builder encodingFormat(String encodingFormat) { + @NotNull public Builder encodingFormat(String encodingFormat) { this.encodingFormat = encodingFormat; return this; } /** * Date the content expires and is no longer useful or available. Useful for videos. */ - public Builder expires(java.util.Date date) { + @NotNull public Builder expires(java.util.Date date) { this.expires = date; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -124,13 +128,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -138,60 +142,60 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * Player type required—for example, Flash or Silverlight. */ - public Builder playerType(String playerType) { + @NotNull public Builder playerType(String playerType) { this.playerType = playerType; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place place) { + @NotNull public Builder regionsAllowed(Place place) { this.regionsAllowed = place; return this; } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place.Builder place) { + @NotNull public Builder regionsAllowed(Place.Builder place) { return this.regionsAllowed(place.build()); } /** * Indicates if use of the media require a subscription (either paid or free). Allowed values are true or false (note that an earlier version had 'yes', 'no'). */ - public Builder requiresSubscription(Boolean requiresSubscription) { + @NotNull public Builder requiresSubscription(Boolean requiresSubscription) { this.requiresSubscription = requiresSubscription; return this; } /** * Date when this media object was uploaded to this site. */ - public Builder uploadDate(java.util.Date date) { + @NotNull public Builder uploadDate(java.util.Date date) { this.uploadDate = date; return this; } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -199,13 +203,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -213,133 +217,133 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -347,13 +351,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -361,20 +365,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -382,13 +386,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -396,40 +400,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -437,13 +441,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -451,13 +455,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -465,13 +469,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -479,21 +483,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -501,7 +505,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -509,7 +513,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -517,7 +521,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -525,7 +529,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -533,13 +537,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -547,101 +551,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -649,13 +653,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -663,35 +667,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -699,13 +703,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -713,53 +717,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -767,13 +771,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -781,127 +785,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -909,7 +913,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -917,7 +921,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -925,7 +929,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -933,20 +937,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -954,13 +958,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -968,66 +972,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1035,13 +1039,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1049,40 +1053,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1116,7 +1120,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1151,7 +1155,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1184,7 +1188,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1192,38 +1196,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1302,7 +1306,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1320,171 +1324,171 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedArticle(NewsArticle newsArticle); - Builder associatedArticle(NewsArticle.Builder newsArticle); - Builder bitrate(String bitrate); - Builder contentSize(String contentSize); - Builder contentUrl(String contentUrl); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder embedUrl(String embedUrl); - Builder encodesCreativeWork(CreativeWork creativeWork); - Builder encodesCreativeWork(CreativeWork.Builder creativeWork); - Builder encodingFormat(String encodingFormat); - Builder expires(java.util.Date date); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder playerType(String playerType); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder regionsAllowed(Place place); - Builder regionsAllowed(Place.Builder place); - Builder requiresSubscription(Boolean requiresSubscription); - Builder uploadDate(java.util.Date date); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedArticle(NewsArticle newsArticle); + @NotNull Builder associatedArticle(NewsArticle.Builder newsArticle); + @NotNull Builder bitrate(String bitrate); + @NotNull Builder contentSize(String contentSize); + @NotNull Builder contentUrl(String contentUrl); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder embedUrl(String embedUrl); + @NotNull Builder encodesCreativeWork(CreativeWork creativeWork); + @NotNull Builder encodesCreativeWork(CreativeWork.Builder creativeWork); + @NotNull Builder encodingFormat(String encodingFormat); + @NotNull Builder expires(java.util.Date date); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder playerType(String playerType); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder regionsAllowed(Place place); + @NotNull Builder regionsAllowed(Place.Builder place); + @NotNull Builder requiresSubscription(Boolean requiresSubscription); + @NotNull Builder uploadDate(java.util.Date date); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/NGO.java b/src/main/java/org/schema/NGO.java index 6dbfdcf7..0fbe299d 100644 --- a/src/main/java/org/schema/NGO.java +++ b/src/main/java/org/schema/NGO.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Organization: Non-governmental Organization. */ @@ -25,7 +29,7 @@ public class NGO extends Organization { /** * Builder for {@link NGO} */ - public static final class NGOThingBuilder implements Builder { + static final class NGOThingBuilder implements Builder { /** * Creates new {@link NGO} instance. */ @@ -35,40 +39,40 @@ public NGO build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -76,13 +80,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -90,147 +94,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -238,13 +242,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -252,20 +256,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -287,13 +291,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -301,13 +305,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -315,33 +319,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -349,13 +353,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -363,100 +367,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -490,7 +494,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -525,7 +529,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -558,7 +562,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -566,38 +570,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -647,78 +651,78 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/NailSalon.java b/src/main/java/org/schema/NailSalon.java index 0743e7da..c6fe2135 100644 --- a/src/main/java/org/schema/NailSalon.java +++ b/src/main/java/org/schema/NailSalon.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A nail salon. */ @@ -25,7 +29,7 @@ public class NailSalon extends HealthAndBeautyBusiness { /** * Builder for {@link NailSalon} */ - public static final class NailSalonThingBuilder implements Builder { + static final class NailSalonThingBuilder implements Builder { /** * Creates new {@link NailSalon} instance. */ @@ -35,107 +39,107 @@ public NailSalon build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Neck.java b/src/main/java/org/schema/Neck.java index f8520c38..fa62298e 100644 --- a/src/main/java/org/schema/Neck.java +++ b/src/main/java/org/schema/Neck.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Neck. */ @@ -25,7 +29,7 @@ public class Neck { /** * Builder for {@link Neck} */ - public static final class NeckThingBuilder implements Builder { + static final class NeckThingBuilder implements Builder { /** * Creates new {@link Neck} instance. */ @@ -34,7 +38,7 @@ public Neck build() { } } public interface Builder extends ThingBuilder { - + } protected Neck() { diff --git a/src/main/java/org/schema/Nerve.java b/src/main/java/org/schema/Nerve.java index 3c06f256..a3a75e82 100644 --- a/src/main/java/org/schema/Nerve.java +++ b/src/main/java/org/schema/Nerve.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A common pathway for the electrochemical nerve impulses that are transmitted along each of the axons. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -50,7 +54,7 @@ public BrainStructure getSourcedFrom() { /** * Builder for {@link Nerve} */ - public static final class NerveThingBuilder implements Builder { + static final class NerveThingBuilder implements Builder { /** * Creates new {@link Nerve} instance. */ @@ -60,33 +64,33 @@ public Nerve build() { /** * The branches that delineate from the nerve bundle. */ - public Builder branch(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder branch(AnatomicalStructure anatomicalStructure) { this.branch = anatomicalStructure; return this; } /** * The branches that delineate from the nerve bundle. */ - public Builder branch(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder branch(AnatomicalStructure.Builder anatomicalStructure) { return this.branch(anatomicalStructure.build()); } /** * The neurological pathway extension that involves muscle control. */ - public Builder nerveMotor(Muscle muscle) { + @NotNull public Builder nerveMotor(Muscle muscle) { this.nerveMotor = muscle; return this; } /** * The neurological pathway extension that involves muscle control. */ - public Builder nerveMotor(Muscle.Builder muscle) { + @NotNull public Builder nerveMotor(Muscle.Builder muscle) { return this.nerveMotor(muscle.build()); } /** * The neurological pathway extension that inputs and sends information to the brain or spinal cord. */ - public Builder sensoryUnit(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder sensoryUnit(AnatomicalStructure anatomicalStructure) { if (this.sensoryUnit == null) this.sensoryUnit = new AnatomicalStructureOrSuperficialAnatomy(); this.sensoryUnit.setAnatomicalStructure(anatomicalStructure); return this; @@ -94,13 +98,13 @@ public Builder sensoryUnit(AnatomicalStructure anatomicalStructure) { /** * The neurological pathway extension that inputs and sends information to the brain or spinal cord. */ - public Builder sensoryUnit(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder sensoryUnit(AnatomicalStructure.Builder anatomicalStructure) { return this.sensoryUnit(anatomicalStructure.build()); } /** * The neurological pathway extension that inputs and sends information to the brain or spinal cord. */ - public Builder sensoryUnit(SuperficialAnatomy superficialAnatomy) { + @NotNull public Builder sensoryUnit(SuperficialAnatomy superficialAnatomy) { if (this.sensoryUnit == null) this.sensoryUnit = new AnatomicalStructureOrSuperficialAnatomy(); this.sensoryUnit.setSuperficialAnatomy(superficialAnatomy); return this; @@ -108,211 +112,211 @@ public Builder sensoryUnit(SuperficialAnatomy superficialAnatomy) { /** * The neurological pathway extension that inputs and sends information to the brain or spinal cord. */ - public Builder sensoryUnit(SuperficialAnatomy.Builder superficialAnatomy) { + @NotNull public Builder sensoryUnit(SuperficialAnatomy.Builder superficialAnatomy) { return this.sensoryUnit(superficialAnatomy.build()); } /** * The neurological pathway that originates the neurons. */ - public Builder sourcedFrom(BrainStructure brainStructure) { + @NotNull public Builder sourcedFrom(BrainStructure brainStructure) { this.sourcedFrom = brainStructure; return this; } /** * The neurological pathway that originates the neurons. */ - public Builder sourcedFrom(BrainStructure.Builder brainStructure) { + @NotNull public Builder sourcedFrom(BrainStructure.Builder brainStructure) { return this.sourcedFrom(brainStructure.build()); } /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -346,7 +350,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -381,7 +385,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -422,38 +426,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -490,54 +494,54 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder branch(AnatomicalStructure anatomicalStructure); - Builder branch(AnatomicalStructure.Builder anatomicalStructure); - Builder nerveMotor(Muscle muscle); - Builder nerveMotor(Muscle.Builder muscle); - Builder sensoryUnit(AnatomicalStructure anatomicalStructure); - Builder sensoryUnit(AnatomicalStructure.Builder anatomicalStructure); - Builder sensoryUnit(SuperficialAnatomy superficialAnatomy); - Builder sensoryUnit(SuperficialAnatomy.Builder superficialAnatomy); - Builder sourcedFrom(BrainStructure brainStructure); - Builder sourcedFrom(BrainStructure.Builder brainStructure); - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder branch(AnatomicalStructure anatomicalStructure); + @NotNull Builder branch(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder nerveMotor(Muscle muscle); + @NotNull Builder nerveMotor(Muscle.Builder muscle); + @NotNull Builder sensoryUnit(AnatomicalStructure anatomicalStructure); + @NotNull Builder sensoryUnit(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder sensoryUnit(SuperficialAnatomy superficialAnatomy); + @NotNull Builder sensoryUnit(SuperficialAnatomy.Builder superficialAnatomy); + @NotNull Builder sourcedFrom(BrainStructure brainStructure); + @NotNull Builder sourcedFrom(BrainStructure.Builder brainStructure); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Nerve(AnatomicalStructure branch, Muscle nerveMotor, AnatomicalStructureOrSuperficialAnatomy sensoryUnit, BrainStructure sourcedFrom, 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) { diff --git a/src/main/java/org/schema/Neuro.java b/src/main/java/org/schema/Neuro.java index aa6ef8ed..a4b9640b 100644 --- a/src/main/java/org/schema/Neuro.java +++ b/src/main/java/org/schema/Neuro.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Neuro. */ @@ -25,7 +29,7 @@ public class Neuro { /** * Builder for {@link Neuro} */ - public static final class NeuroThingBuilder implements Builder { + static final class NeuroThingBuilder implements Builder { /** * Creates new {@link Neuro} instance. */ @@ -34,7 +38,7 @@ public Neuro build() { } } public interface Builder extends ThingBuilder { - + } protected Neuro() { diff --git a/src/main/java/org/schema/Neurologic.java b/src/main/java/org/schema/Neurologic.java index 4f9f8980..f090c36e 100644 --- a/src/main/java/org/schema/Neurologic.java +++ b/src/main/java/org/schema/Neurologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that studies the nerves and nervous system and its respective disease states. */ @@ -25,7 +29,7 @@ public class Neurologic { /** * Builder for {@link Neurologic} */ - public static final class NeurologicThingBuilder implements Builder { + static final class NeurologicThingBuilder implements Builder { /** * Creates new {@link Neurologic} instance. */ @@ -34,7 +38,7 @@ public Neurologic build() { } } public interface Builder extends ThingBuilder { - + } protected Neurologic() { diff --git a/src/main/java/org/schema/NewCondition.java b/src/main/java/org/schema/NewCondition.java index 7373358b..7c9e6869 100644 --- a/src/main/java/org/schema/NewCondition.java +++ b/src/main/java/org/schema/NewCondition.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is new. */ @@ -25,7 +29,7 @@ public class NewCondition { /** * Builder for {@link NewCondition} */ - public static final class NewConditionThingBuilder implements Builder { + static final class NewConditionThingBuilder implements Builder { /** * Creates new {@link NewCondition} instance. */ @@ -34,7 +38,7 @@ public NewCondition build() { } } public interface Builder extends ThingBuilder { - + } protected NewCondition() { diff --git a/src/main/java/org/schema/NewsArticle.java b/src/main/java/org/schema/NewsArticle.java index 8f8238fc..9160326d 100644 --- a/src/main/java/org/schema/NewsArticle.java +++ b/src/main/java/org/schema/NewsArticle.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A news article. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews @@ -56,7 +60,7 @@ public String getPrintSection() { /** * Builder for {@link NewsArticle} */ - public static final class NewsArticleThingBuilder implements Builder { + static final class NewsArticleThingBuilder implements Builder { /** * Creates new {@link NewsArticle} instance. */ @@ -66,222 +70,222 @@ public NewsArticle build() { /** * The location where the NewsArticle was produced. */ - public Builder dateline(String dateline) { + @NotNull public Builder dateline(String dateline) { this.dateline = dateline; return this; } /** * The number of the column in which the NewsArticle appears in the print edition. */ - public Builder printColumn(String printColumn) { + @NotNull public Builder printColumn(String printColumn) { this.printColumn = printColumn; return this; } /** * The edition of the print product in which the NewsArticle appears. */ - public Builder printEdition(String printEdition) { + @NotNull public Builder printEdition(String printEdition) { this.printEdition = printEdition; return this; } /** * If this NewsArticle appears in print, this field indicates the name of the page on which the article is found. Please note that this field is intended for the exact page name (e.g. A5, B18). */ - public Builder printPage(String printPage) { + @NotNull public Builder printPage(String printPage) { this.printPage = printPage; return this; } /** * If this NewsArticle appears in print, this field indicates the print section in which the article appeared. */ - public Builder printSection(String printSection) { + @NotNull public Builder printSection(String printSection) { this.printSection = printSection; return this; } /** * The actual body of the article. */ - public Builder articleBody(String articleBody) { + @NotNull public Builder articleBody(String articleBody) { this.articleBody = articleBody; return this; } /** * Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. */ - public Builder articleSection(String articleSection) { + @NotNull public Builder articleSection(String articleSection) { this.articleSection = articleSection; return this; } /** * The number of words in the text of the Article. */ - public Builder wordCount(Integer integer) { - this.wordCount = integer; + @NotNull public Builder wordCount(int wordCount) { + this.wordCount = wordCount; return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -289,13 +293,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -303,20 +307,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -324,13 +328,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -338,40 +342,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -379,13 +383,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -393,13 +397,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -407,13 +411,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -421,21 +425,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -459,7 +463,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -467,7 +471,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -475,13 +479,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -489,101 +493,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -591,13 +595,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -605,35 +609,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -641,13 +645,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -655,53 +659,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -709,13 +713,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -723,127 +727,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -851,7 +855,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -859,7 +863,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -867,7 +871,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -875,20 +879,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -896,13 +900,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -910,66 +914,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -977,13 +981,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -991,40 +995,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1058,7 +1062,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1093,7 +1097,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1126,7 +1130,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1134,38 +1138,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1179,9 +1183,9 @@ public Builder id(long id) { private String printSection; private String articleBody; private String articleSection; - private Integer wordCount; - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private int wordCount; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; private String schemaVersion; private Thing about; @@ -1239,7 +1243,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1257,157 +1261,157 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder dateline(String dateline); - Builder printColumn(String printColumn); - Builder printEdition(String printEdition); - Builder printPage(String printPage); - Builder printSection(String printSection); - Builder articleBody(String articleBody); - Builder articleSection(String articleSection); - Builder wordCount(Integer integer); - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder dateline(String dateline); + @NotNull Builder printColumn(String printColumn); + @NotNull Builder printEdition(String printEdition); + @NotNull Builder printPage(String printPage); + @NotNull Builder printSection(String printSection); + @NotNull Builder articleBody(String articleBody); + @NotNull Builder articleSection(String articleSection); + @NotNull Builder wordCount(int wordCount); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected NewsArticle(String dateline, String printColumn, String printEdition, String printPage, String printSection, 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) { + protected NewsArticle(String dateline, String printColumn, String printEdition, String printPage, String printSection, String articleBody, String articleSection, int wordCount, StringOrInt pageEnd, StringOrInt 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, int 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); myDateline = dateline; myPrintColumn = printColumn; diff --git a/src/main/java/org/schema/NightClub.java b/src/main/java/org/schema/NightClub.java index 3bb6197b..6d02294a 100644 --- a/src/main/java/org/schema/NightClub.java +++ b/src/main/java/org/schema/NightClub.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A nightclub or discotheque. */ @@ -25,7 +29,7 @@ public class NightClub extends EntertainmentBusiness { /** * Builder for {@link NightClub} */ - public static final class NightClubThingBuilder implements Builder { + static final class NightClubThingBuilder implements Builder { /** * Creates new {@link NightClub} instance. */ @@ -35,107 +39,107 @@ public NightClub build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/NoninvasiveProcedure.java b/src/main/java/org/schema/NoninvasiveProcedure.java index 9f54bc39..86dddf01 100644 --- a/src/main/java/org/schema/NoninvasiveProcedure.java +++ b/src/main/java/org/schema/NoninvasiveProcedure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A type of medical procedure that involves noninvasive techniques. */ @@ -25,7 +29,7 @@ public class NoninvasiveProcedure { /** * Builder for {@link NoninvasiveProcedure} */ - public static final class NoninvasiveProcedureThingBuilder implements Builder { + static final class NoninvasiveProcedureThingBuilder implements Builder { /** * Creates new {@link NoninvasiveProcedure} instance. */ @@ -34,7 +38,7 @@ public NoninvasiveProcedure build() { } } public interface Builder extends ThingBuilder { - + } protected NoninvasiveProcedure() { diff --git a/src/main/java/org/schema/Nose.java b/src/main/java/org/schema/Nose.java index 45d8214b..532faab4 100644 --- a/src/main/java/org/schema/Nose.java +++ b/src/main/java/org/schema/Nose.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Nose. */ @@ -25,7 +29,7 @@ public class Nose { /** * Builder for {@link Nose} */ - public static final class NoseThingBuilder implements Builder { + static final class NoseThingBuilder implements Builder { /** * Creates new {@link Nose} instance. */ @@ -34,7 +38,7 @@ public Nose build() { } } public interface Builder extends ThingBuilder { - + } protected Nose() { diff --git a/src/main/java/org/schema/NotYetRecruiting.java b/src/main/java/org/schema/NotYetRecruiting.java index 8b98a9bd..de03a3ed 100644 --- a/src/main/java/org/schema/NotYetRecruiting.java +++ b/src/main/java/org/schema/NotYetRecruiting.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Not yet recruiting. */ @@ -25,7 +29,7 @@ public class NotYetRecruiting { /** * Builder for {@link NotYetRecruiting} */ - public static final class NotYetRecruitingThingBuilder implements Builder { + static final class NotYetRecruitingThingBuilder implements Builder { /** * Creates new {@link NotYetRecruiting} instance. */ @@ -34,7 +38,7 @@ public NotYetRecruiting build() { } } public interface Builder extends ThingBuilder { - + } protected NotYetRecruiting() { diff --git a/src/main/java/org/schema/Notary.java b/src/main/java/org/schema/Notary.java index 213d389a..46c9d22e 100644 --- a/src/main/java/org/schema/Notary.java +++ b/src/main/java/org/schema/Notary.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A notary. */ @@ -25,7 +29,7 @@ public class Notary extends ProfessionalService { /** * Builder for {@link Notary} */ - public static final class NotaryThingBuilder implements Builder { + static final class NotaryThingBuilder implements Builder { /** * Creates new {@link Notary} instance. */ @@ -35,107 +39,107 @@ public Notary build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Number.java b/src/main/java/org/schema/Number.java index 8428717f..b26274e3 100644 --- a/src/main/java/org/schema/Number.java +++ b/src/main/java/org/schema/Number.java @@ -18,34 +18,37 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class Number { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { - if (myInteger != null) return myInteger; + if (myInt != null) return myInt; if (myLong != null) return myLong; if (myFloat != null) return myFloat; if (myDouble != null) return myDouble; if (myString != null) return myString; return null; } - public void setInteger(Integer integer) { clear(); myInteger = integer; } - public Integer getInteger() { return myInteger; } - private Integer myInteger; - public void setLong(Long value) { clear(); myLong = value; } - public Long getLong() { return myLong; } + public void setInt(int value) { clear(); myInt = value; } + public int getInt() { return myInt; } + public void setLong(long value) { clear(); myLong = value; } + public long getLong() { return myLong; } + public void setFloat(float value) { clear(); myFloat = value; } + public float getFloat() { return myFloat; } + public void setDouble(double value) { clear(); myDouble = value; } + public double getDouble() { return myDouble; } + public void setString(String value) { clear(); myString = value; } + public String getString() { return myString; } + private Integer myInt; private Long myLong; - public void setFloat(Float value) { clear(); myFloat = value; } - public Float getFloat() { return myFloat; } private Float myFloat; - public void setDouble(Double value) { clear(); myDouble = value; } - public Double getDouble() { return myDouble; } private Double myDouble; - public void setString(String value) { clear(); myString = value; } - public String getString() { return myString; } private String myString; private void clear() { - myInteger = null; + myInt = null; myLong = null; myFloat = null; myDouble = null; diff --git a/src/main/java/org/schema/NumberOrPriceSpecification.java b/src/main/java/org/schema/NumberOrPriceSpecification.java index 09df6ac7..b5af97ee 100644 --- a/src/main/java/org/schema/NumberOrPriceSpecification.java +++ b/src/main/java/org/schema/NumberOrPriceSpecification.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class NumberOrPriceSpecification { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myNumber != null) return myNumber; if (myPriceSpecification != null) return myPriceSpecification; @@ -32,9 +35,9 @@ public Thing getThing() { } 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 Number myNumber; private PriceSpecification myPriceSpecification; private void clear() { myNumber = null; diff --git a/src/main/java/org/schema/NumberOrPriceSpecificationOrString.java b/src/main/java/org/schema/NumberOrPriceSpecificationOrString.java index 302643bb..0d1c0295 100644 --- a/src/main/java/org/schema/NumberOrPriceSpecificationOrString.java +++ b/src/main/java/org/schema/NumberOrPriceSpecificationOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class NumberOrPriceSpecificationOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myNumber != null) return myNumber; if (myPriceSpecification != null) return myPriceSpecification; @@ -29,12 +32,12 @@ public Object getJsonLdValue() { } 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 Number myNumber; + private PriceSpecification myPriceSpecification; private String myString; private void clear() { myNumber = null; diff --git a/src/main/java/org/schema/NumberOrQuantitativeValue.java b/src/main/java/org/schema/NumberOrQuantitativeValue.java index 5d1234f7..2e44b039 100644 --- a/src/main/java/org/schema/NumberOrQuantitativeValue.java +++ b/src/main/java/org/schema/NumberOrQuantitativeValue.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class NumberOrQuantitativeValue { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myNumber != null) return myNumber; if (myQuantitativeValue != null) return myQuantitativeValue; @@ -32,9 +35,9 @@ public Thing getThing() { } public void setNumber(Number number) { clear(); myNumber = number; } public Number getNumber() { return myNumber; } - private Number myNumber; public void setQuantitativeValue(QuantitativeValue quantitativeValue) { clear(); myQuantitativeValue = quantitativeValue; } public QuantitativeValue getQuantitativeValue() { return myQuantitativeValue; } + private Number myNumber; private QuantitativeValue myQuantitativeValue; private void clear() { myNumber = null; diff --git a/src/main/java/org/schema/NumberOrString.java b/src/main/java/org/schema/NumberOrString.java index fa9e3560..cb51d682 100644 --- a/src/main/java/org/schema/NumberOrString.java +++ b/src/main/java/org/schema/NumberOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class NumberOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myNumber != null) return myNumber; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } 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 Number myNumber; private String myString; private void clear() { myNumber = null; diff --git a/src/main/java/org/schema/Nursing.java b/src/main/java/org/schema/Nursing.java index dd4e040b..da43006f 100644 --- a/src/main/java/org/schema/Nursing.java +++ b/src/main/java/org/schema/Nursing.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Nursing. */ @@ -25,7 +29,7 @@ public class Nursing { /** * Builder for {@link Nursing} */ - public static final class NursingThingBuilder implements Builder { + static final class NursingThingBuilder implements Builder { /** * Creates new {@link Nursing} instance. */ @@ -34,7 +38,7 @@ public Nursing build() { } } public interface Builder extends ThingBuilder { - + } protected Nursing() { diff --git a/src/main/java/org/schema/NutritionInformation.java b/src/main/java/org/schema/NutritionInformation.java index a7049b2d..200f02c9 100644 --- a/src/main/java/org/schema/NutritionInformation.java +++ b/src/main/java/org/schema/NutritionInformation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Nutritional information about the recipe. */ @@ -97,7 +101,7 @@ public Mass getUnsaturatedFatContent() { /** * Builder for {@link NutritionInformation} */ - public static final class NutritionInformationThingBuilder implements Builder { + static final class NutritionInformationThingBuilder implements Builder { /** * Creates new {@link NutritionInformation} instance. */ @@ -107,171 +111,171 @@ public NutritionInformation build() { /** * The number of calories. */ - public Builder calories(Energy energy) { + @NotNull public Builder calories(Energy energy) { this.calories = energy; return this; } /** * The number of calories. */ - public Builder calories(Energy.Builder energy) { + @NotNull public Builder calories(Energy.Builder energy) { return this.calories(energy.build()); } /** * The number of grams of carbohydrates. */ - public Builder carbohydrateContent(Mass mass) { + @NotNull public Builder carbohydrateContent(Mass mass) { this.carbohydrateContent = mass; return this; } /** * The number of grams of carbohydrates. */ - public Builder carbohydrateContent(Mass.Builder mass) { + @NotNull public Builder carbohydrateContent(Mass.Builder mass) { return this.carbohydrateContent(mass.build()); } /** * The number of milligrams of cholesterol. */ - public Builder cholesterolContent(Mass mass) { + @NotNull public Builder cholesterolContent(Mass mass) { this.cholesterolContent = mass; return this; } /** * The number of milligrams of cholesterol. */ - public Builder cholesterolContent(Mass.Builder mass) { + @NotNull public Builder cholesterolContent(Mass.Builder mass) { return this.cholesterolContent(mass.build()); } /** * The number of grams of fat. */ - public Builder fatContent(Mass mass) { + @NotNull public Builder fatContent(Mass mass) { this.fatContent = mass; return this; } /** * The number of grams of fat. */ - public Builder fatContent(Mass.Builder mass) { + @NotNull public Builder fatContent(Mass.Builder mass) { return this.fatContent(mass.build()); } /** * The number of grams of fiber. */ - public Builder fiberContent(Mass mass) { + @NotNull public Builder fiberContent(Mass mass) { this.fiberContent = mass; return this; } /** * The number of grams of fiber. */ - public Builder fiberContent(Mass.Builder mass) { + @NotNull public Builder fiberContent(Mass.Builder mass) { return this.fiberContent(mass.build()); } /** * The number of grams of protein. */ - public Builder proteinContent(Mass mass) { + @NotNull public Builder proteinContent(Mass mass) { this.proteinContent = mass; return this; } /** * The number of grams of protein. */ - public Builder proteinContent(Mass.Builder mass) { + @NotNull public Builder proteinContent(Mass.Builder mass) { return this.proteinContent(mass.build()); } /** * The number of grams of saturated fat. */ - public Builder saturatedFatContent(Mass mass) { + @NotNull public Builder saturatedFatContent(Mass mass) { this.saturatedFatContent = mass; return this; } /** * The number of grams of saturated fat. */ - public Builder saturatedFatContent(Mass.Builder mass) { + @NotNull public Builder saturatedFatContent(Mass.Builder mass) { return this.saturatedFatContent(mass.build()); } /** * The serving size, in terms of the number of volume or mass. */ - public Builder servingSize(String servingSize) { + @NotNull public Builder servingSize(String servingSize) { this.servingSize = servingSize; return this; } /** * The number of milligrams of sodium. */ - public Builder sodiumContent(Mass mass) { + @NotNull public Builder sodiumContent(Mass mass) { this.sodiumContent = mass; return this; } /** * The number of milligrams of sodium. */ - public Builder sodiumContent(Mass.Builder mass) { + @NotNull public Builder sodiumContent(Mass.Builder mass) { return this.sodiumContent(mass.build()); } /** * The number of grams of sugar. */ - public Builder sugarContent(Mass mass) { + @NotNull public Builder sugarContent(Mass mass) { this.sugarContent = mass; return this; } /** * The number of grams of sugar. */ - public Builder sugarContent(Mass.Builder mass) { + @NotNull public Builder sugarContent(Mass.Builder mass) { return this.sugarContent(mass.build()); } /** * The number of grams of trans fat. */ - public Builder transFatContent(Mass mass) { + @NotNull public Builder transFatContent(Mass mass) { this.transFatContent = mass; return this; } /** * The number of grams of trans fat. */ - public Builder transFatContent(Mass.Builder mass) { + @NotNull public Builder transFatContent(Mass.Builder mass) { return this.transFatContent(mass.build()); } /** * The number of grams of unsaturated fat. */ - public Builder unsaturatedFatContent(Mass mass) { + @NotNull public Builder unsaturatedFatContent(Mass mass) { this.unsaturatedFatContent = mass; return this; } /** * The number of grams of unsaturated fat. */ - public Builder unsaturatedFatContent(Mass.Builder mass) { + @NotNull public Builder unsaturatedFatContent(Mass.Builder mass) { return this.unsaturatedFatContent(mass.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -305,7 +309,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -340,7 +344,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -373,7 +377,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -381,38 +385,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -442,41 +446,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder calories(Energy energy); - Builder calories(Energy.Builder energy); - Builder carbohydrateContent(Mass mass); - Builder carbohydrateContent(Mass.Builder mass); - Builder cholesterolContent(Mass mass); - Builder cholesterolContent(Mass.Builder mass); - Builder fatContent(Mass mass); - Builder fatContent(Mass.Builder mass); - Builder fiberContent(Mass mass); - Builder fiberContent(Mass.Builder mass); - Builder proteinContent(Mass mass); - Builder proteinContent(Mass.Builder mass); - Builder saturatedFatContent(Mass mass); - Builder saturatedFatContent(Mass.Builder mass); - Builder servingSize(String servingSize); - Builder sodiumContent(Mass mass); - Builder sodiumContent(Mass.Builder mass); - Builder sugarContent(Mass mass); - Builder sugarContent(Mass.Builder mass); - Builder transFatContent(Mass mass); - Builder transFatContent(Mass.Builder mass); - Builder unsaturatedFatContent(Mass mass); - Builder unsaturatedFatContent(Mass.Builder mass); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder calories(Energy energy); + @NotNull Builder calories(Energy.Builder energy); + @NotNull Builder carbohydrateContent(Mass mass); + @NotNull Builder carbohydrateContent(Mass.Builder mass); + @NotNull Builder cholesterolContent(Mass mass); + @NotNull Builder cholesterolContent(Mass.Builder mass); + @NotNull Builder fatContent(Mass mass); + @NotNull Builder fatContent(Mass.Builder mass); + @NotNull Builder fiberContent(Mass mass); + @NotNull Builder fiberContent(Mass.Builder mass); + @NotNull Builder proteinContent(Mass mass); + @NotNull Builder proteinContent(Mass.Builder mass); + @NotNull Builder saturatedFatContent(Mass mass); + @NotNull Builder saturatedFatContent(Mass.Builder mass); + @NotNull Builder servingSize(String servingSize); + @NotNull Builder sodiumContent(Mass mass); + @NotNull Builder sodiumContent(Mass.Builder mass); + @NotNull Builder sugarContent(Mass mass); + @NotNull Builder sugarContent(Mass.Builder mass); + @NotNull Builder transFatContent(Mass mass); + @NotNull Builder transFatContent(Mass.Builder mass); + @NotNull Builder unsaturatedFatContent(Mass mass); + @NotNull Builder unsaturatedFatContent(Mass.Builder mass); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected NutritionInformation(Energy calories, Mass carbohydrateContent, Mass cholesterolContent, Mass fatContent, Mass fiberContent, Mass proteinContent, Mass saturatedFatContent, String servingSize, Mass sodiumContent, Mass sugarContent, Mass transFatContent, Mass unsaturatedFatContent, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/OTC.java b/src/main/java/org/schema/OTC.java index e053a289..a381e749 100644 --- a/src/main/java/org/schema/OTC.java +++ b/src/main/java/org/schema/OTC.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Available over the counter. */ @@ -25,7 +29,7 @@ public class OTC { /** * Builder for {@link OTC} */ - public static final class OTCThingBuilder implements Builder { + static final class OTCThingBuilder implements Builder { /** * Creates new {@link OTC} instance. */ @@ -34,7 +38,7 @@ public OTC build() { } } public interface Builder extends ThingBuilder { - + } protected OTC() { diff --git a/src/main/java/org/schema/Observational.java b/src/main/java/org/schema/Observational.java index 79ec35b9..28dc18ba 100644 --- a/src/main/java/org/schema/Observational.java +++ b/src/main/java/org/schema/Observational.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An observational study design. */ @@ -25,7 +29,7 @@ public class Observational { /** * Builder for {@link Observational} */ - public static final class ObservationalThingBuilder implements Builder { + static final class ObservationalThingBuilder implements Builder { /** * Creates new {@link Observational} instance. */ @@ -34,7 +38,7 @@ public Observational build() { } } public interface Builder extends ThingBuilder { - + } protected Observational() { diff --git a/src/main/java/org/schema/Obstetric.java b/src/main/java/org/schema/Obstetric.java index 1e9c53b2..9860ab30 100644 --- a/src/main/java/org/schema/Obstetric.java +++ b/src/main/java/org/schema/Obstetric.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that specializes in the care of women during the prenatal and postnatal care and with the delivery of the child. */ @@ -25,7 +29,7 @@ public class Obstetric { /** * Builder for {@link Obstetric} */ - public static final class ObstetricThingBuilder implements Builder { + static final class ObstetricThingBuilder implements Builder { /** * Creates new {@link Obstetric} instance. */ @@ -34,7 +38,7 @@ public Obstetric build() { } } public interface Builder extends ThingBuilder { - + } protected Obstetric() { diff --git a/src/main/java/org/schema/OccupationalActivity.java b/src/main/java/org/schema/OccupationalActivity.java index 2e1bcb2f..f3f6ae68 100644 --- a/src/main/java/org/schema/OccupationalActivity.java +++ b/src/main/java/org/schema/OccupationalActivity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any physical activity engaged in for job-related purposes. Examples may include waiting tables, maid service, carrying a mailbag, picking fruits or vegetables, construction work, etc. */ @@ -25,7 +29,7 @@ public class OccupationalActivity { /** * Builder for {@link OccupationalActivity} */ - public static final class OccupationalActivityThingBuilder implements Builder { + static final class OccupationalActivityThingBuilder implements Builder { /** * Creates new {@link OccupationalActivity} instance. */ @@ -34,7 +38,7 @@ public OccupationalActivity build() { } } public interface Builder extends ThingBuilder { - + } protected OccupationalActivity() { diff --git a/src/main/java/org/schema/OccupationalTherapy.java b/src/main/java/org/schema/OccupationalTherapy.java index 70ec1dfd..c2d477af 100644 --- a/src/main/java/org/schema/OccupationalTherapy.java +++ b/src/main/java/org/schema/OccupationalTherapy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Occupational therapy. */ @@ -25,7 +29,7 @@ public class OccupationalTherapy { /** * Builder for {@link OccupationalTherapy} */ - public static final class OccupationalTherapyThingBuilder implements Builder { + static final class OccupationalTherapyThingBuilder implements Builder { /** * Creates new {@link OccupationalTherapy} instance. */ @@ -34,7 +38,7 @@ public OccupationalTherapy build() { } } public interface Builder extends ThingBuilder { - + } protected OccupationalTherapy() { diff --git a/src/main/java/org/schema/OceanBodyOfWater.java b/src/main/java/org/schema/OceanBodyOfWater.java index 09846eaa..28784bf4 100644 --- a/src/main/java/org/schema/OceanBodyOfWater.java +++ b/src/main/java/org/schema/OceanBodyOfWater.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An ocean (for example, the Pacific). */ @@ -25,7 +29,7 @@ public class OceanBodyOfWater extends BodyOfWater { /** * Builder for {@link OceanBodyOfWater} */ - public static final class OceanBodyOfWaterThingBuilder implements Builder { + static final class OceanBodyOfWaterThingBuilder implements Builder { /** * Creates new {@link OceanBodyOfWater} instance. */ @@ -35,66 +39,66 @@ public OceanBodyOfWater build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Offer.java b/src/main/java/org/schema/Offer.java index 3adfedae..3b4b199b 100644 --- a/src/main/java/org/schema/Offer.java +++ b/src/main/java/org/schema/Offer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An offer to transfer some rights to an item or to provide a service—for example, an offer to sell tickets to an event, to rent the DVD of a movie, to stream a TV show over the internet, to repair a motorcycle, or to loan a book. *

@@ -61,14 +65,14 @@ public ItemAvailability getAvailability() { /** * The end of the availability of the product or service included in the offer. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getAvailabilityEnds() { return myAvailabilityEnds; } /** * The beginning of the availability of the product or service included in the offer. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getAvailabilityStarts() { return myAvailabilityStarts; } @@ -227,7 +231,7 @@ public PriceSpecification getPriceSpecification() { /** * The date after which the price is no longer available. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getPriceValidUntil() { return myPriceValidUntil; } @@ -252,14 +256,14 @@ public String getSku() { /** * The date when the item becomes valid. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidFrom() { return myValidFrom; } /** * The end of the validity of offer, price specification, or opening hours data. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidThrough() { return myValidThrough; } @@ -278,7 +282,7 @@ public String getPriceCurrency() { /** * Builder for {@link Offer} */ - public static final class OfferThingBuilder implements Builder { + static final class OfferThingBuilder implements Builder { /** * Creates new {@link Offer} instance. */ @@ -288,125 +292,125 @@ public Offer build() { /** * The payment method(s) accepted by seller for this offer. */ - public Builder acceptedPaymentMethod(PaymentMethod paymentMethod) { + @NotNull public Builder acceptedPaymentMethod(PaymentMethod paymentMethod) { this.acceptedPaymentMethod = paymentMethod; return this; } /** * The payment method(s) accepted by seller for this offer. */ - public Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod) { + @NotNull public Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod) { return this.acceptedPaymentMethod(paymentMethod.build()); } /** * An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge). */ - public Builder addOn(Offer offer) { + @NotNull public Builder addOn(Offer offer) { this.addOn = offer; return this; } /** * An additional offer that can only be obtained in combination with the first base offer (e.g. supplements and extensions that are available for a surcharge). */ - public Builder addOn(Offer.Builder offer) { + @NotNull public Builder addOn(Offer.Builder offer) { return this.addOn(offer.build()); } /** * The amount of time that is required between accepting the offer and the actual usage of the resource or service. */ - public Builder advanceBookingRequirement(QuantitativeValue quantitativeValue) { + @NotNull public Builder advanceBookingRequirement(QuantitativeValue quantitativeValue) { this.advanceBookingRequirement = quantitativeValue; return this; } /** * The amount of time that is required between accepting the offer and the actual usage of the resource or service. */ - public Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue) { return this.advanceBookingRequirement(quantitativeValue.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The availability of this item—for example In stock, Out of stock, Pre-order, etc. */ - public Builder availability(ItemAvailability itemAvailability) { + @NotNull public Builder availability(ItemAvailability itemAvailability) { this.availability = itemAvailability; return this; } /** * The availability of this item—for example In stock, Out of stock, Pre-order, etc. */ - public Builder availability(ItemAvailability.Builder itemAvailability) { + @NotNull public Builder availability(ItemAvailability.Builder itemAvailability) { return this.availability(itemAvailability.build()); } /** * The end of the availability of the product or service included in the offer. */ - public Builder availabilityEnds(java.util.Date date) { + @NotNull public Builder availabilityEnds(java.util.Date date) { this.availabilityEnds = date; return this; } /** * The beginning of the availability of the product or service included in the offer. */ - public Builder availabilityStarts(java.util.Date date) { + @NotNull public Builder availabilityStarts(java.util.Date date) { this.availabilityStarts = date; return this; } /** * The place(s) from which the offer can be obtained (e.g. store locations). */ - public Builder availableAtOrFrom(Place place) { + @NotNull public Builder availableAtOrFrom(Place place) { this.availableAtOrFrom = place; return this; } /** * The place(s) from which the offer can be obtained (e.g. store locations). */ - public Builder availableAtOrFrom(Place.Builder place) { + @NotNull public Builder availableAtOrFrom(Place.Builder place) { return this.availableAtOrFrom(place.build()); } /** * The delivery method(s) available for this offer. */ - public Builder availableDeliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder availableDeliveryMethod(DeliveryMethod deliveryMethod) { this.availableDeliveryMethod = deliveryMethod; return this; } /** * The delivery method(s) available for this offer. */ - public Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.availableDeliveryMethod(deliveryMethod.build()); } /** * The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell. */ - public Builder businessFunction(BusinessFunction businessFunction) { + @NotNull public Builder businessFunction(BusinessFunction businessFunction) { this.businessFunction = businessFunction; return this; } /** * The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell. */ - public Builder businessFunction(BusinessFunction.Builder businessFunction) { + @NotNull public Builder businessFunction(BusinessFunction.Builder businessFunction) { return this.businessFunction(businessFunction.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -414,13 +418,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -428,7 +432,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -436,65 +440,65 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The typical delay between the receipt of the order and the goods leaving the warehouse. */ - public Builder deliveryLeadTime(QuantitativeValue quantitativeValue) { + @NotNull public Builder deliveryLeadTime(QuantitativeValue quantitativeValue) { this.deliveryLeadTime = quantitativeValue; return this; } /** * The typical delay between the receipt of the order and the goods leaving the warehouse. */ - public Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue) { return this.deliveryLeadTime(quantitativeValue.build()); } /** * The type(s) of customers for which the given offer is valid. */ - public Builder eligibleCustomerType(BusinessEntityType businessEntityType) { + @NotNull public Builder eligibleCustomerType(BusinessEntityType businessEntityType) { this.eligibleCustomerType = businessEntityType; return this; } /** * The type(s) of customers for which the given offer is valid. */ - public Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType) { + @NotNull public Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType) { return this.eligibleCustomerType(businessEntityType.build()); } /** * The duration for which the given offer is valid. */ - public Builder eligibleDuration(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleDuration(QuantitativeValue quantitativeValue) { this.eligibleDuration = quantitativeValue; return this; } /** * The duration for which the given offer is valid. */ - public Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue) { return this.eligibleDuration(quantitativeValue.build()); } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { this.eligibleQuantity = quantitativeValue; return this; } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { return this.eligibleQuantity(quantitativeValue.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(GeoShape geoShape) { + @NotNull public Builder eligibleRegion(GeoShape geoShape) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setGeoShape(geoShape); return this; @@ -502,13 +506,13 @@ public Builder eligibleRegion(GeoShape geoShape) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(GeoShape.Builder geoShape) { + @NotNull public Builder eligibleRegion(GeoShape.Builder geoShape) { return this.eligibleRegion(geoShape.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(Place place) { + @NotNull public Builder eligibleRegion(Place place) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setPlace(place); return this; @@ -516,13 +520,13 @@ public Builder eligibleRegion(Place place) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(Place.Builder place) { + @NotNull public Builder eligibleRegion(Place.Builder place) { return this.eligibleRegion(place.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is valid. */ - public Builder eligibleRegion(String eligibleRegion) { + @NotNull public Builder eligibleRegion(String eligibleRegion) { if (this.eligibleRegion == null) this.eligibleRegion = new GeoShapeOrPlaceOrString(); this.eligibleRegion.setString(eligibleRegion); return this; @@ -530,7 +534,7 @@ public Builder eligibleRegion(String eligibleRegion) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(GeoShape geoShape) { + @NotNull public Builder ineligibleRegion(GeoShape geoShape) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setGeoShape(geoShape); return this; @@ -538,13 +542,13 @@ public Builder ineligibleRegion(GeoShape geoShape) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(GeoShape.Builder geoShape) { + @NotNull public Builder ineligibleRegion(GeoShape.Builder geoShape) { return this.ineligibleRegion(geoShape.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(Place place) { + @NotNull public Builder ineligibleRegion(Place place) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setPlace(place); return this; @@ -552,13 +556,13 @@ public Builder ineligibleRegion(Place place) { /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(Place.Builder place) { + @NotNull public Builder ineligibleRegion(Place.Builder place) { return this.ineligibleRegion(place.build()); } /** * The ISO 3166-1 (ISO 3166-1 alpha-2) or ISO 3166-2 code, the place, or the GeoShape for the geo-political region(s) for which the offer or delivery charge specification is not valid, e.g. a region where the transaction is not allowed. */ - public Builder ineligibleRegion(String ineligibleRegion) { + @NotNull public Builder ineligibleRegion(String ineligibleRegion) { if (this.ineligibleRegion == null) this.ineligibleRegion = new GeoShapeOrPlaceOrString(); this.ineligibleRegion.setString(ineligibleRegion); return this; @@ -566,100 +570,100 @@ public Builder ineligibleRegion(String ineligibleRegion) { /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { this.eligibleTransactionVolume = priceSpecification; return this; } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { return this.eligibleTransactionVolume(priceSpecification.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * This links to a node or nodes indicating the exact quantity of the products included in the offer. */ - public Builder includesObject(TypeAndQuantityNode typeAndQuantityNode) { + @NotNull public Builder includesObject(TypeAndQuantityNode typeAndQuantityNode) { this.includesObject = typeAndQuantityNode; return this; } /** * This links to a node or nodes indicating the exact quantity of the products included in the offer. */ - public Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode) { + @NotNull public Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode) { return this.includesObject(typeAndQuantityNode.build()); } /** * The current approximate inventory level for the item or items. */ - public Builder inventoryLevel(QuantitativeValue quantitativeValue) { + @NotNull public Builder inventoryLevel(QuantitativeValue quantitativeValue) { this.inventoryLevel = quantitativeValue; return this; } /** * The current approximate inventory level for the item or items. */ - public Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue) { return this.inventoryLevel(quantitativeValue.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * The item being offered. */ - public Builder itemOffered(Product product) { + @NotNull public Builder itemOffered(Product product) { this.itemOffered = product; return this; } /** * The item being offered. */ - public Builder itemOffered(Product.Builder product) { + @NotNull public Builder itemOffered(Product.Builder product) { return this.itemOffered(product.build()); } /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } @@ -686,7 +690,7 @@ public Builder mpn(String mpn) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -714,7 +718,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -722,102 +726,102 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The date after which the price is no longer available. */ - public Builder priceValidUntil(java.util.Date date) { + @NotNull public Builder priceValidUntil(java.util.Date date) { this.priceValidUntil = date; return this; } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider. */ - public Builder seller(Participant participant) { + @NotNull public Builder seller(Participant participant) { this.seller = participant; return this; } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The end of the validity of offer, price specification, or opening hours data. */ - public Builder validThrough(java.util.Date date) { + @NotNull public Builder validThrough(java.util.Date date) { this.validThrough = date; return this; } /** * The warranty promise(s) included in the offer. */ - public Builder warranty(WarrantyPromise warrantyPromise) { + @NotNull public Builder warranty(WarrantyPromise warrantyPromise) { this.warranty = warrantyPromise; return this; } /** * The warranty promise(s) included in the offer. */ - public Builder warranty(WarrantyPromise.Builder warrantyPromise) { + @NotNull public Builder warranty(WarrantyPromise.Builder warrantyPromise) { return this.warranty(warrantyPromise.build()); } /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -851,7 +855,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -886,7 +890,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -919,7 +923,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -927,38 +931,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1013,88 +1017,88 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptedPaymentMethod(PaymentMethod paymentMethod); - Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod); - Builder addOn(Offer offer); - Builder addOn(Offer.Builder offer); - Builder advanceBookingRequirement(QuantitativeValue quantitativeValue); - Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder availability(ItemAvailability itemAvailability); - Builder availability(ItemAvailability.Builder itemAvailability); - Builder availabilityEnds(java.util.Date date); - Builder availabilityStarts(java.util.Date date); - Builder availableAtOrFrom(Place place); - Builder availableAtOrFrom(Place.Builder place); - Builder availableDeliveryMethod(DeliveryMethod deliveryMethod); - Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder businessFunction(BusinessFunction businessFunction); - Builder businessFunction(BusinessFunction.Builder businessFunction); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder deliveryLeadTime(QuantitativeValue quantitativeValue); - Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue); - Builder eligibleCustomerType(BusinessEntityType businessEntityType); - Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType); - Builder eligibleDuration(QuantitativeValue quantitativeValue); - Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue); - Builder eligibleQuantity(QuantitativeValue quantitativeValue); - Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); - Builder eligibleRegion(GeoShape geoShape); - Builder eligibleRegion(GeoShape.Builder geoShape); - Builder eligibleRegion(Place place); - Builder eligibleRegion(Place.Builder place); - Builder eligibleRegion(String eligibleRegion); - Builder ineligibleRegion(GeoShape geoShape); - Builder ineligibleRegion(GeoShape.Builder geoShape); - Builder ineligibleRegion(Place place); - Builder ineligibleRegion(Place.Builder place); - Builder ineligibleRegion(String ineligibleRegion); - Builder eligibleTransactionVolume(PriceSpecification priceSpecification); - Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder includesObject(TypeAndQuantityNode typeAndQuantityNode); - Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode); - Builder inventoryLevel(QuantitativeValue quantitativeValue); - Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder itemOffered(Product product); - Builder itemOffered(Product.Builder product); - Builder mpn(String mpn); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder priceValidUntil(java.util.Date date); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seller(Participant participant); - Builder sku(String sku); - Builder validFrom(java.util.Date date); - Builder validThrough(java.util.Date date); - Builder warranty(WarrantyPromise warrantyPromise); - Builder warranty(WarrantyPromise.Builder warrantyPromise); - Builder priceCurrency(String priceCurrency); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptedPaymentMethod(PaymentMethod paymentMethod); + @NotNull Builder acceptedPaymentMethod(PaymentMethod.Builder paymentMethod); + @NotNull Builder addOn(Offer offer); + @NotNull Builder addOn(Offer.Builder offer); + @NotNull Builder advanceBookingRequirement(QuantitativeValue quantitativeValue); + @NotNull Builder advanceBookingRequirement(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder availability(ItemAvailability itemAvailability); + @NotNull Builder availability(ItemAvailability.Builder itemAvailability); + @NotNull Builder availabilityEnds(java.util.Date date); + @NotNull Builder availabilityStarts(java.util.Date date); + @NotNull Builder availableAtOrFrom(Place place); + @NotNull Builder availableAtOrFrom(Place.Builder place); + @NotNull Builder availableDeliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder availableDeliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder businessFunction(BusinessFunction businessFunction); + @NotNull Builder businessFunction(BusinessFunction.Builder businessFunction); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder deliveryLeadTime(QuantitativeValue quantitativeValue); + @NotNull Builder deliveryLeadTime(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleCustomerType(BusinessEntityType businessEntityType); + @NotNull Builder eligibleCustomerType(BusinessEntityType.Builder businessEntityType); + @NotNull Builder eligibleDuration(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleDuration(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleRegion(GeoShape geoShape); + @NotNull Builder eligibleRegion(GeoShape.Builder geoShape); + @NotNull Builder eligibleRegion(Place place); + @NotNull Builder eligibleRegion(Place.Builder place); + @NotNull Builder eligibleRegion(String eligibleRegion); + @NotNull Builder ineligibleRegion(GeoShape geoShape); + @NotNull Builder ineligibleRegion(GeoShape.Builder geoShape); + @NotNull Builder ineligibleRegion(Place place); + @NotNull Builder ineligibleRegion(Place.Builder place); + @NotNull Builder ineligibleRegion(String ineligibleRegion); + @NotNull Builder eligibleTransactionVolume(PriceSpecification priceSpecification); + @NotNull Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder includesObject(TypeAndQuantityNode typeAndQuantityNode); + @NotNull Builder includesObject(TypeAndQuantityNode.Builder typeAndQuantityNode); + @NotNull Builder inventoryLevel(QuantitativeValue quantitativeValue); + @NotNull Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder itemOffered(Product product); + @NotNull Builder itemOffered(Product.Builder product); + @NotNull Builder mpn(String mpn); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder priceValidUntil(java.util.Date date); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seller(Participant participant); + @NotNull Builder sku(String sku); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validThrough(java.util.Date date); + @NotNull Builder warranty(WarrantyPromise warrantyPromise); + @NotNull Builder warranty(WarrantyPromise.Builder warrantyPromise); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/OfferItemCondition.java b/src/main/java/org/schema/OfferItemCondition.java index 5de5d239..5b8e2ed8 100644 --- a/src/main/java/org/schema/OfferItemCondition.java +++ b/src/main/java/org/schema/OfferItemCondition.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A list of possible conditions for the item. */ @@ -25,7 +29,7 @@ public class OfferItemCondition extends Enumeration { /** * Builder for {@link OfferItemCondition} */ - public static final class OfferItemConditionThingBuilder implements Builder { + static final class OfferItemConditionThingBuilder implements Builder { /** * Creates new {@link OfferItemCondition} instance. */ @@ -35,7 +39,7 @@ public OfferItemCondition build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected OfferItemCondition(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/OfficeEquipmentStore.java b/src/main/java/org/schema/OfficeEquipmentStore.java index bc990389..076c2e1b 100644 --- a/src/main/java/org/schema/OfficeEquipmentStore.java +++ b/src/main/java/org/schema/OfficeEquipmentStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An office equipment store. */ @@ -25,7 +29,7 @@ public class OfficeEquipmentStore extends Store { /** * Builder for {@link OfficeEquipmentStore} */ - public static final class OfficeEquipmentStoreThingBuilder implements Builder { + static final class OfficeEquipmentStoreThingBuilder implements Builder { /** * Creates new {@link OfficeEquipmentStore} instance. */ @@ -35,107 +39,107 @@ public OfficeEquipmentStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/OfflinePermanently.java b/src/main/java/org/schema/OfflinePermanently.java index a0ffd066..71e5a298 100644 --- a/src/main/java/org/schema/OfflinePermanently.java +++ b/src/main/java/org/schema/OfflinePermanently.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Game server status: OfflinePermanently. Server is offline and not available. */ @@ -25,7 +29,7 @@ public class OfflinePermanently { /** * Builder for {@link OfflinePermanently} */ - public static final class OfflinePermanentlyThingBuilder implements Builder { + static final class OfflinePermanentlyThingBuilder implements Builder { /** * Creates new {@link OfflinePermanently} instance. */ @@ -34,7 +38,7 @@ public OfflinePermanently build() { } } public interface Builder extends ThingBuilder { - + } protected OfflinePermanently() { diff --git a/src/main/java/org/schema/OfflineTemporarily.java b/src/main/java/org/schema/OfflineTemporarily.java index 05cae53b..eaa722b7 100644 --- a/src/main/java/org/schema/OfflineTemporarily.java +++ b/src/main/java/org/schema/OfflineTemporarily.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Game server status: OfflineTemporarily. Server is offline now but it can be online soon. */ @@ -25,7 +29,7 @@ public class OfflineTemporarily { /** * Builder for {@link OfflineTemporarily} */ - public static final class OfflineTemporarilyThingBuilder implements Builder { + static final class OfflineTemporarilyThingBuilder implements Builder { /** * Creates new {@link OfflineTemporarily} instance. */ @@ -34,7 +38,7 @@ public OfflineTemporarily build() { } } public interface Builder extends ThingBuilder { - + } protected OfflineTemporarily() { diff --git a/src/main/java/org/schema/OnDemandEvent.java b/src/main/java/org/schema/OnDemandEvent.java index 863522d4..447eb307 100644 --- a/src/main/java/org/schema/OnDemandEvent.java +++ b/src/main/java/org/schema/OnDemandEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A publication event e.g. catch-up TV or radio podcast, during which a program is available on-demand. */ @@ -25,7 +29,7 @@ public class OnDemandEvent extends PublicationEvent { /** * Builder for {@link OnDemandEvent} */ - public static final class OnDemandEventThingBuilder implements Builder { + static final class OnDemandEventThingBuilder implements Builder { /** * Creates new {@link OnDemandEvent} instance. */ @@ -35,40 +39,40 @@ public OnDemandEvent build() { /** * A flag to signal that the publication is accessible for free. */ - public Builder isAccessibleForFree(Boolean isAccessibleForFree) { + @NotNull public Builder isAccessibleForFree(Boolean isAccessibleForFree) { this.isAccessibleForFree = isAccessibleForFree; return this; } /** * A broadcast service associated with the publication event. */ - public Builder publishedOn(BroadcastService broadcastService) { + @NotNull public Builder publishedOn(BroadcastService broadcastService) { this.publishedOn = broadcastService; return this; } /** * A broadcast service associated with the publication event. */ - public Builder publishedOn(BroadcastService.Builder broadcastService) { + @NotNull public Builder publishedOn(BroadcastService.Builder broadcastService) { return this.publishedOn(broadcastService.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -76,13 +80,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -90,13 +94,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -104,13 +108,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -118,53 +122,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -172,13 +176,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -186,20 +190,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -207,13 +211,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -221,113 +225,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -361,7 +365,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -396,7 +400,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -429,7 +433,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -437,38 +441,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -506,59 +510,59 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder isAccessibleForFree(Boolean isAccessibleForFree); - Builder publishedOn(BroadcastService broadcastService); - Builder publishedOn(BroadcastService.Builder broadcastService); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder isAccessibleForFree(Boolean isAccessibleForFree); + @NotNull Builder publishedOn(BroadcastService broadcastService); + @NotNull Builder publishedOn(BroadcastService.Builder broadcastService); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/OnSitePickup.java b/src/main/java/org/schema/OnSitePickup.java index 4ec8e3cf..220dcad6 100644 --- a/src/main/java/org/schema/OnSitePickup.java +++ b/src/main/java/org/schema/OnSitePickup.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A DeliveryMethod in which an item is collected on site, e.g. in a store or at a box office. */ @@ -25,7 +29,7 @@ public class OnSitePickup { /** * Builder for {@link OnSitePickup} */ - public static final class OnSitePickupThingBuilder implements Builder { + static final class OnSitePickupThingBuilder implements Builder { /** * Creates new {@link OnSitePickup} instance. */ @@ -34,7 +38,7 @@ public OnSitePickup build() { } } public interface Builder extends ThingBuilder { - + } protected OnSitePickup() { diff --git a/src/main/java/org/schema/Oncologic.java b/src/main/java/org/schema/Oncologic.java index 6f3bbb29..6772eab2 100644 --- a/src/main/java/org/schema/Oncologic.java +++ b/src/main/java/org/schema/Oncologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that deals with benign and malignant tumors, including the study of their development, diagnosis, treatment and prevention. */ @@ -25,7 +29,7 @@ public class Oncologic { /** * Builder for {@link Oncologic} */ - public static final class OncologicThingBuilder implements Builder { + static final class OncologicThingBuilder implements Builder { /** * Creates new {@link Oncologic} instance. */ @@ -34,7 +38,7 @@ public Oncologic build() { } } public interface Builder extends ThingBuilder { - + } protected Oncologic() { diff --git a/src/main/java/org/schema/Online.java b/src/main/java/org/schema/Online.java index bc676697..ee3e06d2 100644 --- a/src/main/java/org/schema/Online.java +++ b/src/main/java/org/schema/Online.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Game server status: Online. Server is available. */ @@ -25,7 +29,7 @@ public class Online { /** * Builder for {@link Online} */ - public static final class OnlineThingBuilder implements Builder { + static final class OnlineThingBuilder implements Builder { /** * Creates new {@link Online} instance. */ @@ -34,7 +38,7 @@ public Online build() { } } public interface Builder extends ThingBuilder { - + } protected Online() { diff --git a/src/main/java/org/schema/OnlineFull.java b/src/main/java/org/schema/OnlineFull.java index 5428b1e5..4f192da9 100644 --- a/src/main/java/org/schema/OnlineFull.java +++ b/src/main/java/org/schema/OnlineFull.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Game server status: OnlineFull. Server is online but unavailable. The maximum number of players has reached. */ @@ -25,7 +29,7 @@ public class OnlineFull { /** * Builder for {@link OnlineFull} */ - public static final class OnlineFullThingBuilder implements Builder { + static final class OnlineFullThingBuilder implements Builder { /** * Creates new {@link OnlineFull} instance. */ @@ -34,7 +38,7 @@ public OnlineFull build() { } } public interface Builder extends ThingBuilder { - + } protected OnlineFull() { diff --git a/src/main/java/org/schema/OnlineOnly.java b/src/main/java/org/schema/OnlineOnly.java index 1ed0a7eb..512fe9ff 100644 --- a/src/main/java/org/schema/OnlineOnly.java +++ b/src/main/java/org/schema/OnlineOnly.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is available only online. */ @@ -25,7 +29,7 @@ public class OnlineOnly { /** * Builder for {@link OnlineOnly} */ - public static final class OnlineOnlyThingBuilder implements Builder { + static final class OnlineOnlyThingBuilder implements Builder { /** * Creates new {@link OnlineOnly} instance. */ @@ -34,7 +38,7 @@ public OnlineOnly build() { } } public interface Builder extends ThingBuilder { - + } protected OnlineOnly() { diff --git a/src/main/java/org/schema/OpenTrial.java b/src/main/java/org/schema/OpenTrial.java index 243ae1fd..73f3ed02 100644 --- a/src/main/java/org/schema/OpenTrial.java +++ b/src/main/java/org/schema/OpenTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A trial design in which the researcher knows the full details of the treatment, and so does the patient. */ @@ -25,7 +29,7 @@ public class OpenTrial { /** * Builder for {@link OpenTrial} */ - public static final class OpenTrialThingBuilder implements Builder { + static final class OpenTrialThingBuilder implements Builder { /** * Creates new {@link OpenTrial} instance. */ @@ -34,7 +38,7 @@ public OpenTrial build() { } } public interface Builder extends ThingBuilder { - + } protected OpenTrial() { diff --git a/src/main/java/org/schema/OpeningHoursSpecification.java b/src/main/java/org/schema/OpeningHoursSpecification.java index ea6a80d1..76859e30 100644 --- a/src/main/java/org/schema/OpeningHoursSpecification.java +++ b/src/main/java/org/schema/OpeningHoursSpecification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A structured value providing information about the opening hours of a place or a certain service inside a place. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -26,7 +30,7 @@ public class OpeningHoursSpecification extends StructuredValue { /** * The closing hour of the place or service on the given day(s) of the week. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getCloses() { return myCloses; } @@ -39,28 +43,28 @@ public DayOfWeek getDayOfWeek() { /** * The opening hour of the place or service on the given day(s) of the week. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getOpens() { return myOpens; } /** * The date when the item becomes valid. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidFrom() { return myValidFrom; } /** * The end of the validity of offer, price specification, or opening hours data. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidThrough() { return myValidThrough; } /** * Builder for {@link OpeningHoursSpecification} */ - public static final class OpeningHoursSpecificationThingBuilder implements Builder { + static final class OpeningHoursSpecificationThingBuilder implements Builder { /** * Creates new {@link OpeningHoursSpecification} instance. */ @@ -70,62 +74,62 @@ public OpeningHoursSpecification build() { /** * The closing hour of the place or service on the given day(s) of the week. */ - public Builder closes(java.util.Date date) { + @NotNull public Builder closes(java.util.Date date) { this.closes = date; return this; } /** * The day of the week for which these opening hours are valid. */ - public Builder dayOfWeek(DayOfWeek dayOfWeek) { + @NotNull public Builder dayOfWeek(DayOfWeek dayOfWeek) { this.dayOfWeek = dayOfWeek; return this; } /** * The day of the week for which these opening hours are valid. */ - public Builder dayOfWeek(DayOfWeek.Builder dayOfWeek) { + @NotNull public Builder dayOfWeek(DayOfWeek.Builder dayOfWeek) { return this.dayOfWeek(dayOfWeek.build()); } /** * The opening hour of the place or service on the given day(s) of the week. */ - public Builder opens(java.util.Date date) { + @NotNull public Builder opens(java.util.Date date) { this.opens = date; return this; } /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The end of the validity of offer, price specification, or opening hours data. */ - public Builder validThrough(java.util.Date date) { + @NotNull public Builder validThrough(java.util.Date date) { this.validThrough = date; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -159,7 +163,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -194,7 +198,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -227,7 +231,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -235,38 +239,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -289,24 +293,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder closes(java.util.Date date); - Builder dayOfWeek(DayOfWeek dayOfWeek); - Builder dayOfWeek(DayOfWeek.Builder dayOfWeek); - Builder opens(java.util.Date date); - Builder validFrom(java.util.Date date); - Builder validThrough(java.util.Date date); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder closes(java.util.Date date); + @NotNull Builder dayOfWeek(DayOfWeek dayOfWeek); + @NotNull Builder dayOfWeek(DayOfWeek.Builder dayOfWeek); + @NotNull Builder opens(java.util.Date date); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validThrough(java.util.Date date); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected OpeningHoursSpecification(java.util.Date closes, DayOfWeek dayOfWeek, java.util.Date opens, java.util.Date validFrom, java.util.Date validThrough, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Optician.java b/src/main/java/org/schema/Optician.java index 09a09f73..be06d4c7 100644 --- a/src/main/java/org/schema/Optician.java +++ b/src/main/java/org/schema/Optician.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A store that sells reading glasses and similar devices for improving vision. */ @@ -25,7 +29,7 @@ public class Optician extends MedicalOrganization { /** * Builder for {@link Optician} */ - public static final class OpticianThingBuilder implements Builder { + static final class OpticianThingBuilder implements Builder { /** * Creates new {@link Optician} instance. */ @@ -35,107 +39,107 @@ public Optician build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Optometic.java b/src/main/java/org/schema/Optometic.java index 569bc3e3..3a2aa9bd 100644 --- a/src/main/java/org/schema/Optometic.java +++ b/src/main/java/org/schema/Optometic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Optometry. */ @@ -25,7 +29,7 @@ public class Optometic { /** * Builder for {@link Optometic} */ - public static final class OptometicThingBuilder implements Builder { + static final class OptometicThingBuilder implements Builder { /** * Creates new {@link Optometic} instance. */ @@ -34,7 +38,7 @@ public Optometic build() { } } public interface Builder extends ThingBuilder { - + } protected Optometic() { diff --git a/src/main/java/org/schema/Order.java b/src/main/java/org/schema/Order.java index 48491ac3..8febb5f4 100644 --- a/src/main/java/org/schema/Order.java +++ b/src/main/java/org/schema/Order.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An order is a confirmation of a transaction (a receipt), which can contain multiple line items, each represented by an Offer that has been accepted by the customer. */ @@ -79,7 +83,7 @@ public Boolean getIsGift() { /** * Date order was placed. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getOrderDate() { return myOrderDate; } @@ -110,7 +114,7 @@ public Invoice getPartOfInvoice() { /** * The date that payment is due. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getPaymentDue() { return myPaymentDue; } @@ -147,7 +151,7 @@ public OrganizationOrPerson getBroker() { /** * Builder for {@link Order} */ - public static final class OrderThingBuilder implements Builder { + static final class OrderThingBuilder implements Builder { /** * Creates new {@link Order} instance. */ @@ -157,53 +161,53 @@ public Order build() { /** * The delivery of the parcel related to this order or order item. */ - public Builder orderDelivery(ParcelDelivery parcelDelivery) { + @NotNull public Builder orderDelivery(ParcelDelivery parcelDelivery) { this.orderDelivery = parcelDelivery; return this; } /** * The delivery of the parcel related to this order or order item. */ - public Builder orderDelivery(ParcelDelivery.Builder parcelDelivery) { + @NotNull public Builder orderDelivery(ParcelDelivery.Builder parcelDelivery) { return this.orderDelivery(parcelDelivery.build()); } /** * The offer(s) -- e.g., product, quantity and price combinations -- included in the order. */ - public Builder acceptedOffer(Offer offer) { + @NotNull public Builder acceptedOffer(Offer offer) { this.acceptedOffer = offer; return this; } /** * The offer(s) -- e.g., product, quantity and price combinations -- included in the order. */ - public Builder acceptedOffer(Offer.Builder offer) { + @NotNull public Builder acceptedOffer(Offer.Builder offer) { return this.acceptedOffer(offer.build()); } /** * The billing address for the order. */ - public Builder billingAddress(PostalAddress postalAddress) { + @NotNull public Builder billingAddress(PostalAddress postalAddress) { this.billingAddress = postalAddress; return this; } /** * The billing address for the order. */ - public Builder billingAddress(PostalAddress.Builder postalAddress) { + @NotNull public Builder billingAddress(PostalAddress.Builder postalAddress) { return this.billingAddress(postalAddress.build()); } /** * A number that confirms the given order or payment has been received. */ - public Builder confirmationNumber(String confirmationNumber) { + @NotNull public Builder confirmationNumber(String confirmationNumber) { this.confirmationNumber = confirmationNumber; return this; } /** * Party placing the order or paying the invoice. */ - public Builder customer(Organization organization) { + @NotNull public Builder customer(Organization organization) { if (this.customer == null) this.customer = new OrganizationOrPerson(); this.customer.setOrganization(organization); return this; @@ -211,13 +215,13 @@ public Builder customer(Organization organization) { /** * Party placing the order or paying the invoice. */ - public Builder customer(Organization.Builder organization) { + @NotNull public Builder customer(Organization.Builder organization) { return this.customer(organization.build()); } /** * Party placing the order or paying the invoice. */ - public Builder customer(Person person) { + @NotNull public Builder customer(Person person) { if (this.customer == null) this.customer = new OrganizationOrPerson(); this.customer.setPerson(person); return this; @@ -225,13 +229,13 @@ public Builder customer(Person person) { /** * Party placing the order or paying the invoice. */ - public Builder customer(Person.Builder person) { + @NotNull public Builder customer(Person.Builder person) { return this.customer(person.build()); } /** * Any discount applied (to an Order). */ - public Builder discount(Number number) { + @NotNull public Builder discount(Number number) { if (this.discount == null) this.discount = new NumberOrString(); this.discount.setNumber(number); return this; @@ -239,7 +243,7 @@ public Builder discount(Number number) { /** * Any discount applied (to an Order). */ - public Builder discount(String discount) { + @NotNull public Builder discount(String discount) { if (this.discount == null) this.discount = new NumberOrString(); this.discount.setString(discount); return this; @@ -247,35 +251,35 @@ public Builder discount(String discount) { /** * Code used to redeem a discount. */ - public Builder discountCode(String discountCode) { + @NotNull public Builder discountCode(String discountCode) { this.discountCode = discountCode; return this; } /** * The currency (in 3-letter ISO 4217 format) of the discount. */ - public Builder discountCurrency(String discountCurrency) { + @NotNull public Builder discountCurrency(String discountCurrency) { this.discountCurrency = discountCurrency; return this; } /** * Was the offer accepted as a gift for someone other than the buyer. */ - public Builder isGift(Boolean isGift) { + @NotNull public Builder isGift(Boolean isGift) { this.isGift = isGift; return this; } /** * Date order was placed. */ - public Builder orderDate(java.util.Date date) { + @NotNull public Builder orderDate(java.util.Date date) { this.orderDate = date; return this; } /** * The item ordered. */ - public Builder orderedItem(OrderItem orderItem) { + @NotNull public Builder orderedItem(OrderItem orderItem) { if (this.orderedItem == null) this.orderedItem = new OrderItemOrProduct(); this.orderedItem.setOrderItem(orderItem); return this; @@ -283,13 +287,13 @@ public Builder orderedItem(OrderItem orderItem) { /** * The item ordered. */ - public Builder orderedItem(OrderItem.Builder orderItem) { + @NotNull public Builder orderedItem(OrderItem.Builder orderItem) { return this.orderedItem(orderItem.build()); } /** * The item ordered. */ - public Builder orderedItem(Product product) { + @NotNull public Builder orderedItem(Product product) { if (this.orderedItem == null) this.orderedItem = new OrderItemOrProduct(); this.orderedItem.setProduct(product); return this; @@ -297,87 +301,87 @@ public Builder orderedItem(Product product) { /** * The item ordered. */ - public Builder orderedItem(Product.Builder product) { + @NotNull public Builder orderedItem(Product.Builder product) { return this.orderedItem(product.build()); } /** * The identifier of the transaction. */ - public Builder orderNumber(String orderNumber) { + @NotNull public Builder orderNumber(String orderNumber) { this.orderNumber = orderNumber; return this; } /** * The current status of the order. */ - public Builder orderStatus(OrderStatus orderStatus) { + @NotNull public Builder orderStatus(OrderStatus orderStatus) { this.orderStatus = orderStatus; return this; } /** * The current status of the order. */ - public Builder orderStatus(OrderStatus.Builder orderStatus) { + @NotNull public Builder orderStatus(OrderStatus.Builder orderStatus) { return this.orderStatus(orderStatus.build()); } /** * The order is being paid as part of the referenced Invoice. */ - public Builder partOfInvoice(Invoice invoice) { + @NotNull public Builder partOfInvoice(Invoice invoice) { this.partOfInvoice = invoice; return this; } /** * The order is being paid as part of the referenced Invoice. */ - public Builder partOfInvoice(Invoice.Builder invoice) { + @NotNull public Builder partOfInvoice(Invoice.Builder invoice) { return this.partOfInvoice(invoice.build()); } /** * The date that payment is due. */ - public Builder paymentDue(java.util.Date date) { + @NotNull public Builder paymentDue(java.util.Date date) { this.paymentDue = date; return this; } /** * The name of the credit card or other method of payment for the order. */ - public Builder paymentMethod(PaymentMethod paymentMethod) { + @NotNull public Builder paymentMethod(PaymentMethod paymentMethod) { this.paymentMethod = paymentMethod; return this; } /** * The name of the credit card or other method of payment for the order. */ - public Builder paymentMethod(PaymentMethod.Builder paymentMethod) { + @NotNull public Builder paymentMethod(PaymentMethod.Builder paymentMethod) { return this.paymentMethod(paymentMethod.build()); } /** * An identifier for the method of payment used (e.g. the last 4 digits of the credit card). */ - public Builder paymentMethodId(String paymentMethodId) { + @NotNull public Builder paymentMethodId(String paymentMethodId) { this.paymentMethodId = paymentMethodId; return this; } /** * The URL for sending a payment. */ - public Builder paymentUrl(String paymentUrl) { + @NotNull public Builder paymentUrl(String paymentUrl) { this.paymentUrl = paymentUrl; return this; } /** * An entity which offers (sells / leases / lends / loans) the services / goods. A seller may also be a provider. */ - public Builder seller(Participant participant) { + @NotNull public Builder seller(Participant participant) { this.seller = participant; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -385,13 +389,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -399,27 +403,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -453,7 +457,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -488,7 +492,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -521,7 +525,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -529,38 +533,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -598,54 +602,54 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder orderDelivery(ParcelDelivery parcelDelivery); - Builder orderDelivery(ParcelDelivery.Builder parcelDelivery); - Builder acceptedOffer(Offer offer); - Builder acceptedOffer(Offer.Builder offer); - Builder billingAddress(PostalAddress postalAddress); - Builder billingAddress(PostalAddress.Builder postalAddress); - Builder confirmationNumber(String confirmationNumber); - Builder customer(Organization organization); - Builder customer(Organization.Builder organization); - Builder customer(Person person); - Builder customer(Person.Builder person); - Builder discount(Number number); - Builder discount(String discount); - Builder discountCode(String discountCode); - Builder discountCurrency(String discountCurrency); - Builder isGift(Boolean isGift); - Builder orderDate(java.util.Date date); - Builder orderedItem(OrderItem orderItem); - Builder orderedItem(OrderItem.Builder orderItem); - Builder orderedItem(Product product); - Builder orderedItem(Product.Builder product); - Builder orderNumber(String orderNumber); - Builder orderStatus(OrderStatus orderStatus); - Builder orderStatus(OrderStatus.Builder orderStatus); - Builder partOfInvoice(Invoice invoice); - Builder partOfInvoice(Invoice.Builder invoice); - Builder paymentDue(java.util.Date date); - Builder paymentMethod(PaymentMethod paymentMethod); - Builder paymentMethod(PaymentMethod.Builder paymentMethod); - Builder paymentMethodId(String paymentMethodId); - Builder paymentUrl(String paymentUrl); - Builder seller(Participant participant); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder orderDelivery(ParcelDelivery parcelDelivery); + @NotNull Builder orderDelivery(ParcelDelivery.Builder parcelDelivery); + @NotNull Builder acceptedOffer(Offer offer); + @NotNull Builder acceptedOffer(Offer.Builder offer); + @NotNull Builder billingAddress(PostalAddress postalAddress); + @NotNull Builder billingAddress(PostalAddress.Builder postalAddress); + @NotNull Builder confirmationNumber(String confirmationNumber); + @NotNull Builder customer(Organization organization); + @NotNull Builder customer(Organization.Builder organization); + @NotNull Builder customer(Person person); + @NotNull Builder customer(Person.Builder person); + @NotNull Builder discount(Number number); + @NotNull Builder discount(String discount); + @NotNull Builder discountCode(String discountCode); + @NotNull Builder discountCurrency(String discountCurrency); + @NotNull Builder isGift(Boolean isGift); + @NotNull Builder orderDate(java.util.Date date); + @NotNull Builder orderedItem(OrderItem orderItem); + @NotNull Builder orderedItem(OrderItem.Builder orderItem); + @NotNull Builder orderedItem(Product product); + @NotNull Builder orderedItem(Product.Builder product); + @NotNull Builder orderNumber(String orderNumber); + @NotNull Builder orderStatus(OrderStatus orderStatus); + @NotNull Builder orderStatus(OrderStatus.Builder orderStatus); + @NotNull Builder partOfInvoice(Invoice invoice); + @NotNull Builder partOfInvoice(Invoice.Builder invoice); + @NotNull Builder paymentDue(java.util.Date date); + @NotNull Builder paymentMethod(PaymentMethod paymentMethod); + @NotNull Builder paymentMethod(PaymentMethod.Builder paymentMethod); + @NotNull Builder paymentMethodId(String paymentMethodId); + @NotNull Builder paymentUrl(String paymentUrl); + @NotNull Builder seller(Participant participant); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/OrderAction.java b/src/main/java/org/schema/OrderAction.java index 757e39a3..cb70182e 100644 --- a/src/main/java/org/schema/OrderAction.java +++ b/src/main/java/org/schema/OrderAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent orders an object/product/service to be delivered/sent. */ @@ -31,7 +35,7 @@ public DeliveryMethod getDeliveryMethod() { /** * Builder for {@link OrderAction} */ - public static final class OrderActionThingBuilder implements Builder { + static final class OrderActionThingBuilder implements Builder { /** * Creates new {@link OrderAction} instance. */ @@ -41,14 +45,14 @@ public OrderAction build() { /** * A sub property of instrument. The method of delivery. */ - public Builder deliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder deliveryMethod(DeliveryMethod deliveryMethod) { this.deliveryMethod = deliveryMethod; return this; } /** * A sub property of instrument. The method of delivery. */ - public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.deliveryMethod(deliveryMethod.build()); } /** @@ -74,7 +78,7 @@ public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -102,7 +106,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -110,20 +114,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -131,13 +135,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -145,7 +149,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -153,7 +157,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -162,67 +166,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -256,7 +260,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -291,7 +295,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -324,7 +328,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -332,38 +336,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -390,36 +394,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder deliveryMethod(DeliveryMethod deliveryMethod); - Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder deliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/OrderCancelled.java b/src/main/java/org/schema/OrderCancelled.java index d34db426..0bdd1761 100644 --- a/src/main/java/org/schema/OrderCancelled.java +++ b/src/main/java/org/schema/OrderCancelled.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * OrderStatus representing cancellation of an order. */ @@ -25,7 +29,7 @@ public class OrderCancelled { /** * Builder for {@link OrderCancelled} */ - public static final class OrderCancelledThingBuilder implements Builder { + static final class OrderCancelledThingBuilder implements Builder { /** * Creates new {@link OrderCancelled} instance. */ @@ -34,7 +38,7 @@ public OrderCancelled build() { } } public interface Builder extends ThingBuilder { - + } protected OrderCancelled() { diff --git a/src/main/java/org/schema/OrderDelivered.java b/src/main/java/org/schema/OrderDelivered.java index ce6767e6..7463a9f7 100644 --- a/src/main/java/org/schema/OrderDelivered.java +++ b/src/main/java/org/schema/OrderDelivered.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * OrderStatus representing successful delivery of an order. */ @@ -25,7 +29,7 @@ public class OrderDelivered { /** * Builder for {@link OrderDelivered} */ - public static final class OrderDeliveredThingBuilder implements Builder { + static final class OrderDeliveredThingBuilder implements Builder { /** * Creates new {@link OrderDelivered} instance. */ @@ -34,7 +38,7 @@ public OrderDelivered build() { } } public interface Builder extends ThingBuilder { - + } protected OrderDelivered() { diff --git a/src/main/java/org/schema/OrderInTransit.java b/src/main/java/org/schema/OrderInTransit.java index 966d2c14..6942e59a 100644 --- a/src/main/java/org/schema/OrderInTransit.java +++ b/src/main/java/org/schema/OrderInTransit.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * OrderStatus representing that an order is in transit. */ @@ -25,7 +29,7 @@ public class OrderInTransit { /** * Builder for {@link OrderInTransit} */ - public static final class OrderInTransitThingBuilder implements Builder { + static final class OrderInTransitThingBuilder implements Builder { /** * Creates new {@link OrderInTransit} instance. */ @@ -34,7 +38,7 @@ public OrderInTransit build() { } } public interface Builder extends ThingBuilder { - + } protected OrderInTransit() { diff --git a/src/main/java/org/schema/OrderItem.java b/src/main/java/org/schema/OrderItem.java index 45ad293a..2c98eb2f 100644 --- a/src/main/java/org/schema/OrderItem.java +++ b/src/main/java/org/schema/OrderItem.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An order item is a line of an order. It includes the quantity and shipping details of a bought offer. */ @@ -55,7 +59,7 @@ public OrderItemOrProduct getOrderedItem() { /** * Builder for {@link OrderItem} */ - public static final class OrderItemThingBuilder implements Builder { + static final class OrderItemThingBuilder implements Builder { /** * Creates new {@link OrderItem} instance. */ @@ -65,15 +69,15 @@ public OrderItem build() { /** * The number of the item ordered. If the property is not set, assume the quantity is one. */ - public Builder orderQuantity(Integer integer) { + @NotNull public Builder orderQuantity(int orderQuantity) { if (this.orderQuantity == null) this.orderQuantity = new Number(); - this.orderQuantity.setInteger(integer); + this.orderQuantity.setInt(orderQuantity); return this; } /** * The number of the item ordered. If the property is not set, assume the quantity is one. */ - public Builder orderQuantity(Long orderQuantity) { + @NotNull public Builder orderQuantity(long orderQuantity) { if (this.orderQuantity == null) this.orderQuantity = new Number(); this.orderQuantity.setLong(orderQuantity); return this; @@ -81,7 +85,7 @@ public Builder orderQuantity(Long orderQuantity) { /** * The number of the item ordered. If the property is not set, assume the quantity is one. */ - public Builder orderQuantity(Float orderQuantity) { + @NotNull public Builder orderQuantity(float orderQuantity) { if (this.orderQuantity == null) this.orderQuantity = new Number(); this.orderQuantity.setFloat(orderQuantity); return this; @@ -89,7 +93,7 @@ public Builder orderQuantity(Float orderQuantity) { /** * The number of the item ordered. If the property is not set, assume the quantity is one. */ - public Builder orderQuantity(Double orderQuantity) { + @NotNull public Builder orderQuantity(double orderQuantity) { if (this.orderQuantity == null) this.orderQuantity = new Number(); this.orderQuantity.setDouble(orderQuantity); return this; @@ -97,7 +101,7 @@ public Builder orderQuantity(Double orderQuantity) { /** * The number of the item ordered. If the property is not set, assume the quantity is one. */ - public Builder orderQuantity(String orderQuantity) { + @NotNull public Builder orderQuantity(String orderQuantity) { if (this.orderQuantity == null) this.orderQuantity = new Number(); this.orderQuantity.setString(orderQuantity); return this; @@ -105,40 +109,40 @@ public Builder orderQuantity(String orderQuantity) { /** * The current status of the order item. */ - public Builder orderItemStatus(OrderStatus orderStatus) { + @NotNull public Builder orderItemStatus(OrderStatus orderStatus) { this.orderItemStatus = orderStatus; return this; } /** * The current status of the order item. */ - public Builder orderItemStatus(OrderStatus.Builder orderStatus) { + @NotNull public Builder orderItemStatus(OrderStatus.Builder orderStatus) { return this.orderItemStatus(orderStatus.build()); } /** * The identifier of the order item. */ - public Builder orderItemNumber(String orderItemNumber) { + @NotNull public Builder orderItemNumber(String orderItemNumber) { this.orderItemNumber = orderItemNumber; return this; } /** * The delivery of the parcel related to this order or order item. */ - public Builder orderDelivery(ParcelDelivery parcelDelivery) { + @NotNull public Builder orderDelivery(ParcelDelivery parcelDelivery) { this.orderDelivery = parcelDelivery; return this; } /** * The delivery of the parcel related to this order or order item. */ - public Builder orderDelivery(ParcelDelivery.Builder parcelDelivery) { + @NotNull public Builder orderDelivery(ParcelDelivery.Builder parcelDelivery) { return this.orderDelivery(parcelDelivery.build()); } /** * The item ordered. */ - public Builder orderedItem(OrderItem orderItem) { + @NotNull public Builder orderedItem(OrderItem orderItem) { if (this.orderedItem == null) this.orderedItem = new OrderItemOrProduct(); this.orderedItem.setOrderItem(orderItem); return this; @@ -146,13 +150,13 @@ public Builder orderedItem(OrderItem orderItem) { /** * The item ordered. */ - public Builder orderedItem(OrderItem.Builder orderItem) { + @NotNull public Builder orderedItem(OrderItem.Builder orderItem) { return this.orderedItem(orderItem.build()); } /** * The item ordered. */ - public Builder orderedItem(Product product) { + @NotNull public Builder orderedItem(Product product) { if (this.orderedItem == null) this.orderedItem = new OrderItemOrProduct(); this.orderedItem.setProduct(product); return this; @@ -160,27 +164,27 @@ public Builder orderedItem(Product product) { /** * The item ordered. */ - public Builder orderedItem(Product.Builder product) { + @NotNull public Builder orderedItem(Product.Builder product) { return this.orderedItem(product.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -214,7 +218,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -282,7 +286,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -290,38 +294,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -344,32 +348,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder orderQuantity(Integer integer); - Builder orderQuantity(Long orderQuantity); - Builder orderQuantity(Float orderQuantity); - Builder orderQuantity(Double orderQuantity); - Builder orderQuantity(String orderQuantity); - Builder orderItemStatus(OrderStatus orderStatus); - Builder orderItemStatus(OrderStatus.Builder orderStatus); - Builder orderItemNumber(String orderItemNumber); - Builder orderDelivery(ParcelDelivery parcelDelivery); - Builder orderDelivery(ParcelDelivery.Builder parcelDelivery); - Builder orderedItem(OrderItem orderItem); - Builder orderedItem(OrderItem.Builder orderItem); - Builder orderedItem(Product product); - Builder orderedItem(Product.Builder product); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder orderQuantity(int orderQuantity); + @NotNull Builder orderQuantity(long orderQuantity); + @NotNull Builder orderQuantity(float orderQuantity); + @NotNull Builder orderQuantity(double orderQuantity); + @NotNull Builder orderQuantity(String orderQuantity); + @NotNull Builder orderItemStatus(OrderStatus orderStatus); + @NotNull Builder orderItemStatus(OrderStatus.Builder orderStatus); + @NotNull Builder orderItemNumber(String orderItemNumber); + @NotNull Builder orderDelivery(ParcelDelivery parcelDelivery); + @NotNull Builder orderDelivery(ParcelDelivery.Builder parcelDelivery); + @NotNull Builder orderedItem(OrderItem orderItem); + @NotNull Builder orderedItem(OrderItem.Builder orderItem); + @NotNull Builder orderedItem(Product product); + @NotNull Builder orderedItem(Product.Builder product); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected OrderItem(Number orderQuantity, OrderStatus orderItemStatus, String orderItemNumber, ParcelDelivery orderDelivery, OrderItemOrProduct orderedItem, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/OrderItemOrProduct.java b/src/main/java/org/schema/OrderItemOrProduct.java index 76d5947a..22070fce 100644 --- a/src/main/java/org/schema/OrderItemOrProduct.java +++ b/src/main/java/org/schema/OrderItemOrProduct.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class OrderItemOrProduct { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myOrderItem != null) return myOrderItem; if (myProduct != null) return myProduct; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setOrderItem(OrderItem orderItem) { clear(); myOrderItem = orderItem; } public OrderItem getOrderItem() { return myOrderItem; } - private OrderItem myOrderItem; public void setProduct(Product product) { clear(); myProduct = product; } public Product getProduct() { return myProduct; } + private OrderItem myOrderItem; private Product myProduct; private void clear() { myOrderItem = null; diff --git a/src/main/java/org/schema/OrderPaymentDue.java b/src/main/java/org/schema/OrderPaymentDue.java index f88b79ad..df106551 100644 --- a/src/main/java/org/schema/OrderPaymentDue.java +++ b/src/main/java/org/schema/OrderPaymentDue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * OrderStatus representing that payment is due on an order. */ @@ -25,7 +29,7 @@ public class OrderPaymentDue { /** * Builder for {@link OrderPaymentDue} */ - public static final class OrderPaymentDueThingBuilder implements Builder { + static final class OrderPaymentDueThingBuilder implements Builder { /** * Creates new {@link OrderPaymentDue} instance. */ @@ -34,7 +38,7 @@ public OrderPaymentDue build() { } } public interface Builder extends ThingBuilder { - + } protected OrderPaymentDue() { diff --git a/src/main/java/org/schema/OrderPickupAvailable.java b/src/main/java/org/schema/OrderPickupAvailable.java index de9dc03d..c5ff16b8 100644 --- a/src/main/java/org/schema/OrderPickupAvailable.java +++ b/src/main/java/org/schema/OrderPickupAvailable.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * OrderStatus representing availability of an order for pickup. */ @@ -25,7 +29,7 @@ public class OrderPickupAvailable { /** * Builder for {@link OrderPickupAvailable} */ - public static final class OrderPickupAvailableThingBuilder implements Builder { + static final class OrderPickupAvailableThingBuilder implements Builder { /** * Creates new {@link OrderPickupAvailable} instance. */ @@ -34,7 +38,7 @@ public OrderPickupAvailable build() { } } public interface Builder extends ThingBuilder { - + } protected OrderPickupAvailable() { diff --git a/src/main/java/org/schema/OrderProblem.java b/src/main/java/org/schema/OrderProblem.java index bca2c5c3..58eb54a0 100644 --- a/src/main/java/org/schema/OrderProblem.java +++ b/src/main/java/org/schema/OrderProblem.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * OrderStatus representing that there is a problem with the order. */ @@ -25,7 +29,7 @@ public class OrderProblem { /** * Builder for {@link OrderProblem} */ - public static final class OrderProblemThingBuilder implements Builder { + static final class OrderProblemThingBuilder implements Builder { /** * Creates new {@link OrderProblem} instance. */ @@ -34,7 +38,7 @@ public OrderProblem build() { } } public interface Builder extends ThingBuilder { - + } protected OrderProblem() { diff --git a/src/main/java/org/schema/OrderProcessing.java b/src/main/java/org/schema/OrderProcessing.java index 49c2a364..69070dee 100644 --- a/src/main/java/org/schema/OrderProcessing.java +++ b/src/main/java/org/schema/OrderProcessing.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * OrderStatus representing that an order is being processed. */ @@ -25,7 +29,7 @@ public class OrderProcessing { /** * Builder for {@link OrderProcessing} */ - public static final class OrderProcessingThingBuilder implements Builder { + static final class OrderProcessingThingBuilder implements Builder { /** * Creates new {@link OrderProcessing} instance. */ @@ -34,7 +38,7 @@ public OrderProcessing build() { } } public interface Builder extends ThingBuilder { - + } protected OrderProcessing() { diff --git a/src/main/java/org/schema/OrderReturned.java b/src/main/java/org/schema/OrderReturned.java index 9e95bad9..2a698d21 100644 --- a/src/main/java/org/schema/OrderReturned.java +++ b/src/main/java/org/schema/OrderReturned.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * OrderStatus representing that an order has been returned. */ @@ -25,7 +29,7 @@ public class OrderReturned { /** * Builder for {@link OrderReturned} */ - public static final class OrderReturnedThingBuilder implements Builder { + static final class OrderReturnedThingBuilder implements Builder { /** * Creates new {@link OrderReturned} instance. */ @@ -34,7 +38,7 @@ public OrderReturned build() { } } public interface Builder extends ThingBuilder { - + } protected OrderReturned() { diff --git a/src/main/java/org/schema/OrderStatus.java b/src/main/java/org/schema/OrderStatus.java index 7c9e0ecc..17753858 100644 --- a/src/main/java/org/schema/OrderStatus.java +++ b/src/main/java/org/schema/OrderStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Enumerated status values for Order. */ @@ -25,7 +29,7 @@ public class OrderStatus extends Enumeration { /** * Builder for {@link OrderStatus} */ - public static final class OrderStatusThingBuilder implements Builder { + static final class OrderStatusThingBuilder implements Builder { /** * Creates new {@link OrderStatus} instance. */ @@ -35,7 +39,7 @@ public OrderStatus build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected OrderStatus(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Organization.java b/src/main/java/org/schema/Organization.java index 391abb44..23c9fdbf 100644 --- a/src/main/java/org/schema/Organization.java +++ b/src/main/java/org/schema/Organization.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An organization such as a school, NGO, corporation, club, etc. */ @@ -97,14 +101,14 @@ public Person getFounder() { /** * The date that this organization was dissolved. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDissolutionDate() { return myDissolutionDate; } /** * The date that this organization was founded. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getFoundingDate() { return myFoundingDate; } @@ -219,7 +223,7 @@ public Place getFoundingLocation() { /** * Builder for {@link Organization} */ - public static final class OrganizationThingBuilder implements Builder { + static final class OrganizationThingBuilder implements Builder { /** * Creates new {@link Organization} instance. */ @@ -229,40 +233,40 @@ public Organization build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -270,13 +274,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -284,147 +288,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -432,13 +436,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -446,20 +450,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -467,13 +471,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -481,13 +485,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -495,13 +499,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -509,33 +513,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -543,13 +547,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -557,100 +561,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -684,7 +688,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -719,7 +723,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -752,7 +756,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -760,38 +764,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -841,78 +845,78 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Organization(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) { diff --git a/src/main/java/org/schema/OrganizationOrPerson.java b/src/main/java/org/schema/OrganizationOrPerson.java index 840bc006..4bfb43f4 100644 --- a/src/main/java/org/schema/OrganizationOrPerson.java +++ b/src/main/java/org/schema/OrganizationOrPerson.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class OrganizationOrPerson { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myOrganization != null) return myOrganization; if (myPerson != null) return myPerson; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setOrganization(Organization organization) { clear(); myOrganization = organization; } public Organization getOrganization() { return myOrganization; } - private Organization myOrganization; public void setPerson(Person person) { clear(); myPerson = person; } public Person getPerson() { return myPerson; } + private Organization myOrganization; private Person myPerson; private void clear() { myOrganization = null; diff --git a/src/main/java/org/schema/OrganizationOrProgramMembership.java b/src/main/java/org/schema/OrganizationOrProgramMembership.java index 24c165d1..87231ceb 100644 --- a/src/main/java/org/schema/OrganizationOrProgramMembership.java +++ b/src/main/java/org/schema/OrganizationOrProgramMembership.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class OrganizationOrProgramMembership { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myOrganization != null) return myOrganization; if (myProgramMembership != null) return myProgramMembership; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setOrganization(Organization organization) { clear(); myOrganization = organization; } public Organization getOrganization() { return myOrganization; } - private Organization myOrganization; public void setProgramMembership(ProgramMembership programMembership) { clear(); myProgramMembership = programMembership; } public ProgramMembership getProgramMembership() { return myProgramMembership; } + private Organization myOrganization; private ProgramMembership myProgramMembership; private void clear() { myOrganization = null; diff --git a/src/main/java/org/schema/OrganizationRole.java b/src/main/java/org/schema/OrganizationRole.java index 2445a6f3..f3a833ba 100644 --- a/src/main/java/org/schema/OrganizationRole.java +++ b/src/main/java/org/schema/OrganizationRole.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A subclass of Role used to describe roles within organizations. */ @@ -31,7 +35,7 @@ public Number getNumberedPosition() { /** * Builder for {@link OrganizationRole} */ - public static final class OrganizationRoleThingBuilder implements Builder { + static final class OrganizationRoleThingBuilder implements Builder { /** * Creates new {@link OrganizationRole} instance. */ @@ -41,15 +45,15 @@ public OrganizationRole build() { /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(Integer integer) { + @NotNull public Builder numberedPosition(int numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); - this.numberedPosition.setInteger(integer); + this.numberedPosition.setInt(numberedPosition); return this; } /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(Long numberedPosition) { + @NotNull public Builder numberedPosition(long numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); this.numberedPosition.setLong(numberedPosition); return this; @@ -57,7 +61,7 @@ public Builder numberedPosition(Long numberedPosition) { /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(Float numberedPosition) { + @NotNull public Builder numberedPosition(float numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); this.numberedPosition.setFloat(numberedPosition); return this; @@ -65,7 +69,7 @@ public Builder numberedPosition(Float numberedPosition) { /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(Double numberedPosition) { + @NotNull public Builder numberedPosition(double numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); this.numberedPosition.setDouble(numberedPosition); return this; @@ -73,7 +77,7 @@ public Builder numberedPosition(Double numberedPosition) { /** * A number associated with a role in an organization, for example, the number on an athlete's jersey. */ - public Builder numberedPosition(String numberedPosition) { + @NotNull public Builder numberedPosition(String numberedPosition) { if (this.numberedPosition == null) this.numberedPosition = new Number(); this.numberedPosition.setString(numberedPosition); return this; @@ -81,35 +85,35 @@ public Builder numberedPosition(String numberedPosition) { /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * A role played, performed or filled by a person or organization. For example, the team of creators for a comic book might fill the roles named 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might play in the position named 'Quarterback'. */ - public Builder roleName(String roleName) { + @NotNull public Builder roleName(String roleName) { this.roleName = roleName; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -143,7 +147,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -178,7 +182,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -211,7 +215,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -219,38 +223,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -271,25 +275,25 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder numberedPosition(Integer integer); - Builder numberedPosition(Long numberedPosition); - Builder numberedPosition(Float numberedPosition); - Builder numberedPosition(Double numberedPosition); - Builder numberedPosition(String numberedPosition); - Builder startDate(java.util.Date date); - Builder roleName(String roleName); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder numberedPosition(int numberedPosition); + @NotNull Builder numberedPosition(long numberedPosition); + @NotNull Builder numberedPosition(float numberedPosition); + @NotNull Builder numberedPosition(double numberedPosition); + @NotNull Builder numberedPosition(String numberedPosition); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder roleName(String roleName); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected OrganizationRole(Number numberedPosition, java.util.Date startDate, String roleName, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/OrganizeAction.java b/src/main/java/org/schema/OrganizeAction.java index a6f24d4c..13008f18 100644 --- a/src/main/java/org/schema/OrganizeAction.java +++ b/src/main/java/org/schema/OrganizeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of manipulating/administering/supervising/controlling one or more objects. */ @@ -25,7 +29,7 @@ public class OrganizeAction extends Action { /** * Builder for {@link OrganizeAction} */ - public static final class OrganizeActionThingBuilder implements Builder { + static final class OrganizeActionThingBuilder implements Builder { /** * Creates new {@link OrganizeAction} instance. */ @@ -35,7 +39,7 @@ public OrganizeAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Osteopathic.java b/src/main/java/org/schema/Osteopathic.java index 5dcb16c8..568e4ad1 100644 --- a/src/main/java/org/schema/Osteopathic.java +++ b/src/main/java/org/schema/Osteopathic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A system of medicine focused on promoting the body's innate ability to heal itself. */ @@ -25,7 +29,7 @@ public class Osteopathic { /** * Builder for {@link Osteopathic} */ - public static final class OsteopathicThingBuilder implements Builder { + static final class OsteopathicThingBuilder implements Builder { /** * Creates new {@link Osteopathic} instance. */ @@ -34,7 +38,7 @@ public Osteopathic build() { } } public interface Builder extends ThingBuilder { - + } protected Osteopathic() { diff --git a/src/main/java/org/schema/Otolaryngologic.java b/src/main/java/org/schema/Otolaryngologic.java index 0e4ecd97..bacf0bb4 100644 --- a/src/main/java/org/schema/Otolaryngologic.java +++ b/src/main/java/org/schema/Otolaryngologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that is concerned with the ear, nose and throat and their respective disease states. */ @@ -25,7 +29,7 @@ public class Otolaryngologic { /** * Builder for {@link Otolaryngologic} */ - public static final class OtolaryngologicThingBuilder implements Builder { + static final class OtolaryngologicThingBuilder implements Builder { /** * Creates new {@link Otolaryngologic} instance. */ @@ -34,7 +38,7 @@ public Otolaryngologic build() { } } public interface Builder extends ThingBuilder { - + } protected Otolaryngologic() { diff --git a/src/main/java/org/schema/OutOfStock.java b/src/main/java/org/schema/OutOfStock.java index 614f70ed..0588f732 100644 --- a/src/main/java/org/schema/OutOfStock.java +++ b/src/main/java/org/schema/OutOfStock.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is out of stock. */ @@ -25,7 +29,7 @@ public class OutOfStock { /** * Builder for {@link OutOfStock} */ - public static final class OutOfStockThingBuilder implements Builder { + static final class OutOfStockThingBuilder implements Builder { /** * Creates new {@link OutOfStock} instance. */ @@ -34,7 +38,7 @@ public OutOfStock build() { } } public interface Builder extends ThingBuilder { - + } protected OutOfStock() { diff --git a/src/main/java/org/schema/OutletStore.java b/src/main/java/org/schema/OutletStore.java index 5a76f8d6..d26bce14 100644 --- a/src/main/java/org/schema/OutletStore.java +++ b/src/main/java/org/schema/OutletStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An outlet store. */ @@ -25,7 +29,7 @@ public class OutletStore extends Store { /** * Builder for {@link OutletStore} */ - public static final class OutletStoreThingBuilder implements Builder { + static final class OutletStoreThingBuilder implements Builder { /** * Creates new {@link OutletStore} instance. */ @@ -35,107 +39,107 @@ public OutletStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/OwnershipInfo.java b/src/main/java/org/schema/OwnershipInfo.java index a2b72d28..9d421446 100644 --- a/src/main/java/org/schema/OwnershipInfo.java +++ b/src/main/java/org/schema/OwnershipInfo.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A structured value providing information about when a certain organization or person owned a certain product. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -32,14 +36,14 @@ public OrganizationOrPerson getAcquiredFrom() { /** * The date and time of obtaining the product. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getOwnedFrom() { return myOwnedFrom; } /** * The date and time of giving up ownership on the product. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getOwnedThrough() { return myOwnedThrough; } @@ -52,7 +56,7 @@ public Product getTypeOfGood() { /** * Builder for {@link OwnershipInfo} */ - public static final class OwnershipInfoThingBuilder implements Builder { + static final class OwnershipInfoThingBuilder implements Builder { /** * Creates new {@link OwnershipInfo} instance. */ @@ -62,7 +66,7 @@ public OwnershipInfo build() { /** * The organization or person from which the product was acquired. */ - public Builder acquiredFrom(Organization organization) { + @NotNull public Builder acquiredFrom(Organization organization) { if (this.acquiredFrom == null) this.acquiredFrom = new OrganizationOrPerson(); this.acquiredFrom.setOrganization(organization); return this; @@ -70,13 +74,13 @@ public Builder acquiredFrom(Organization organization) { /** * The organization or person from which the product was acquired. */ - public Builder acquiredFrom(Organization.Builder organization) { + @NotNull public Builder acquiredFrom(Organization.Builder organization) { return this.acquiredFrom(organization.build()); } /** * The organization or person from which the product was acquired. */ - public Builder acquiredFrom(Person person) { + @NotNull public Builder acquiredFrom(Person person) { if (this.acquiredFrom == null) this.acquiredFrom = new OrganizationOrPerson(); this.acquiredFrom.setPerson(person); return this; @@ -84,54 +88,54 @@ public Builder acquiredFrom(Person person) { /** * The organization or person from which the product was acquired. */ - public Builder acquiredFrom(Person.Builder person) { + @NotNull public Builder acquiredFrom(Person.Builder person) { return this.acquiredFrom(person.build()); } /** * The date and time of obtaining the product. */ - public Builder ownedFrom(java.util.Date date) { + @NotNull public Builder ownedFrom(java.util.Date date) { this.ownedFrom = date; return this; } /** * The date and time of giving up ownership on the product. */ - public Builder ownedThrough(java.util.Date date) { + @NotNull public Builder ownedThrough(java.util.Date date) { this.ownedThrough = date; return this; } /** * The product that this structured value is referring to. */ - public Builder typeOfGood(Product product) { + @NotNull public Builder typeOfGood(Product product) { this.typeOfGood = product; return this; } /** * The product that this structured value is referring to. */ - public Builder typeOfGood(Product.Builder product) { + @NotNull public Builder typeOfGood(Product.Builder product) { return this.typeOfGood(product.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -165,7 +169,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -200,7 +204,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -233,7 +237,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -241,38 +245,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -294,26 +298,26 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acquiredFrom(Organization organization); - Builder acquiredFrom(Organization.Builder organization); - Builder acquiredFrom(Person person); - Builder acquiredFrom(Person.Builder person); - Builder ownedFrom(java.util.Date date); - Builder ownedThrough(java.util.Date date); - Builder typeOfGood(Product product); - Builder typeOfGood(Product.Builder product); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acquiredFrom(Organization organization); + @NotNull Builder acquiredFrom(Organization.Builder organization); + @NotNull Builder acquiredFrom(Person person); + @NotNull Builder acquiredFrom(Person.Builder person); + @NotNull Builder ownedFrom(java.util.Date date); + @NotNull Builder ownedThrough(java.util.Date date); + @NotNull Builder typeOfGood(Product product); + @NotNull Builder typeOfGood(Product.Builder product); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected OwnershipInfo(OrganizationOrPerson acquiredFrom, java.util.Date ownedFrom, java.util.Date ownedThrough, Product typeOfGood, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/OwnershipInfoOrProduct.java b/src/main/java/org/schema/OwnershipInfoOrProduct.java index 6cf03aac..4ed6f07e 100644 --- a/src/main/java/org/schema/OwnershipInfoOrProduct.java +++ b/src/main/java/org/schema/OwnershipInfoOrProduct.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class OwnershipInfoOrProduct { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myOwnershipInfo != null) return myOwnershipInfo; if (myProduct != null) return myProduct; @@ -33,9 +36,9 @@ public Thing getThing() { } public void setOwnershipInfo(OwnershipInfo ownershipInfo) { clear(); myOwnershipInfo = ownershipInfo; } public OwnershipInfo getOwnershipInfo() { return myOwnershipInfo; } - private OwnershipInfo myOwnershipInfo; public void setProduct(Product product) { clear(); myProduct = product; } public Product getProduct() { return myProduct; } + private OwnershipInfo myOwnershipInfo; private Product myProduct; private void clear() { myOwnershipInfo = null; diff --git a/src/main/java/org/schema/PET.java b/src/main/java/org/schema/PET.java index dd8e44da..dc1f2391 100644 --- a/src/main/java/org/schema/PET.java +++ b/src/main/java/org/schema/PET.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Positron emission tomography imaging. */ @@ -25,7 +29,7 @@ public class PET { /** * Builder for {@link PET} */ - public static final class PETThingBuilder implements Builder { + static final class PETThingBuilder implements Builder { /** * Creates new {@link PET} instance. */ @@ -34,7 +38,7 @@ public PET build() { } } public interface Builder extends ThingBuilder { - + } protected PET() { diff --git a/src/main/java/org/schema/PaintAction.java b/src/main/java/org/schema/PaintAction.java index ac801a41..6378a241 100644 --- a/src/main/java/org/schema/PaintAction.java +++ b/src/main/java/org/schema/PaintAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of producing a painting, typically with paint and canvas as instruments. */ @@ -25,7 +29,7 @@ public class PaintAction extends CreateAction { /** * Builder for {@link PaintAction} */ - public static final class PaintActionThingBuilder implements Builder { + static final class PaintActionThingBuilder implements Builder { /** * Creates new {@link PaintAction} instance. */ @@ -35,7 +39,7 @@ public PaintAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Painting.java b/src/main/java/org/schema/Painting.java index bf900e03..6d5fd114 100644 --- a/src/main/java/org/schema/Painting.java +++ b/src/main/java/org/schema/Painting.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A painting. */ @@ -25,7 +29,7 @@ public class Painting extends CreativeWork { /** * Builder for {@link Painting} */ - public static final class PaintingThingBuilder implements Builder { + static final class PaintingThingBuilder implements Builder { /** * Creates new {@link Painting} instance. */ @@ -35,127 +39,127 @@ public Painting build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/PalliativeProcedure.java b/src/main/java/org/schema/PalliativeProcedure.java index ff6556e0..43fe54f6 100644 --- a/src/main/java/org/schema/PalliativeProcedure.java +++ b/src/main/java/org/schema/PalliativeProcedure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical procedure intended primarily for palliative purposes, aimed at relieving the symptoms of an underlying health condition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class PalliativeProcedure extends MedicalTherapy { /** * Builder for {@link PalliativeProcedure} */ - public static final class PalliativeProcedureThingBuilder implements Builder { + static final class PalliativeProcedureThingBuilder implements Builder { /** * Creates new {@link PalliativeProcedure} instance. */ @@ -36,164 +40,164 @@ public PalliativeProcedure build() { /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -227,7 +231,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -303,38 +307,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -363,40 +367,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Paperback.java b/src/main/java/org/schema/Paperback.java index ed2ebab6..10fff4bf 100644 --- a/src/main/java/org/schema/Paperback.java +++ b/src/main/java/org/schema/Paperback.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Book format: Paperback. */ @@ -25,7 +29,7 @@ public class Paperback { /** * Builder for {@link Paperback} */ - public static final class PaperbackThingBuilder implements Builder { + static final class PaperbackThingBuilder implements Builder { /** * Creates new {@link Paperback} instance. */ @@ -34,7 +38,7 @@ public Paperback build() { } } public interface Builder extends ThingBuilder { - + } protected Paperback() { diff --git a/src/main/java/org/schema/ParcelDelivery.java b/src/main/java/org/schema/ParcelDelivery.java index 4b239610..137b3549 100644 --- a/src/main/java/org/schema/ParcelDelivery.java +++ b/src/main/java/org/schema/ParcelDelivery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The delivery of a parcel either via the postal service or a commercial service. */ @@ -37,14 +41,14 @@ public DeliveryEvent getDeliveryStatus() { /** * The earliest date the package may arrive. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getExpectedArrivalFrom() { return myExpectedArrivalFrom; } /** * The latest date the package may arrive. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getExpectedArrivalUntil() { return myExpectedArrivalUntil; } @@ -93,7 +97,7 @@ public OrganizationOrPerson getProvider() { /** * Builder for {@link ParcelDelivery} */ - public static final class ParcelDeliveryThingBuilder implements Builder { + static final class ParcelDeliveryThingBuilder implements Builder { /** * Creates new {@link ParcelDelivery} instance. */ @@ -103,107 +107,107 @@ public ParcelDelivery build() { /** * Destination address. */ - public Builder deliveryAddress(PostalAddress postalAddress) { + @NotNull public Builder deliveryAddress(PostalAddress postalAddress) { this.deliveryAddress = postalAddress; return this; } /** * Destination address. */ - public Builder deliveryAddress(PostalAddress.Builder postalAddress) { + @NotNull public Builder deliveryAddress(PostalAddress.Builder postalAddress) { return this.deliveryAddress(postalAddress.build()); } /** * New entry added as the package passes through each leg of its journey (from shipment to final delivery). */ - public Builder deliveryStatus(DeliveryEvent deliveryEvent) { + @NotNull public Builder deliveryStatus(DeliveryEvent deliveryEvent) { this.deliveryStatus = deliveryEvent; return this; } /** * New entry added as the package passes through each leg of its journey (from shipment to final delivery). */ - public Builder deliveryStatus(DeliveryEvent.Builder deliveryEvent) { + @NotNull public Builder deliveryStatus(DeliveryEvent.Builder deliveryEvent) { return this.deliveryStatus(deliveryEvent.build()); } /** * The earliest date the package may arrive. */ - public Builder expectedArrivalFrom(java.util.Date date) { + @NotNull public Builder expectedArrivalFrom(java.util.Date date) { this.expectedArrivalFrom = date; return this; } /** * The latest date the package may arrive. */ - public Builder expectedArrivalUntil(java.util.Date date) { + @NotNull public Builder expectedArrivalUntil(java.util.Date date) { this.expectedArrivalUntil = date; return this; } /** * Method used for delivery or shipping. */ - public Builder hasDeliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder hasDeliveryMethod(DeliveryMethod deliveryMethod) { this.hasDeliveryMethod = deliveryMethod; return this; } /** * Method used for delivery or shipping. */ - public Builder hasDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder hasDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.hasDeliveryMethod(deliveryMethod.build()); } /** * Item(s) being shipped. */ - public Builder itemShipped(Product product) { + @NotNull public Builder itemShipped(Product product) { this.itemShipped = product; return this; } /** * Item(s) being shipped. */ - public Builder itemShipped(Product.Builder product) { + @NotNull public Builder itemShipped(Product.Builder product) { return this.itemShipped(product.build()); } /** * Shipper's address. */ - public Builder originAddress(PostalAddress postalAddress) { + @NotNull public Builder originAddress(PostalAddress postalAddress) { this.originAddress = postalAddress; return this; } /** * Shipper's address. */ - public Builder originAddress(PostalAddress.Builder postalAddress) { + @NotNull public Builder originAddress(PostalAddress.Builder postalAddress) { return this.originAddress(postalAddress.build()); } /** * The overall order the items in this delivery were included in. */ - public Builder partOfOrder(IsPartOf isPartOf) { + @NotNull public Builder partOfOrder(IsPartOf isPartOf) { this.partOfOrder = isPartOf; return this; } /** * Shipper tracking number. */ - public Builder trackingNumber(String trackingNumber) { + @NotNull public Builder trackingNumber(String trackingNumber) { this.trackingNumber = trackingNumber; return this; } /** * Tracking url for the parcel delivery. */ - public Builder trackingUrl(String trackingUrl) { + @NotNull public Builder trackingUrl(String trackingUrl) { this.trackingUrl = trackingUrl; return this; } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -211,13 +215,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -225,27 +229,27 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -279,7 +283,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -314,7 +318,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -347,7 +351,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -355,38 +359,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -415,37 +419,37 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder deliveryAddress(PostalAddress postalAddress); - Builder deliveryAddress(PostalAddress.Builder postalAddress); - Builder deliveryStatus(DeliveryEvent deliveryEvent); - Builder deliveryStatus(DeliveryEvent.Builder deliveryEvent); - Builder expectedArrivalFrom(java.util.Date date); - Builder expectedArrivalUntil(java.util.Date date); - Builder hasDeliveryMethod(DeliveryMethod deliveryMethod); - Builder hasDeliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder itemShipped(Product product); - Builder itemShipped(Product.Builder product); - Builder originAddress(PostalAddress postalAddress); - Builder originAddress(PostalAddress.Builder postalAddress); - Builder partOfOrder(IsPartOf isPartOf); - Builder trackingNumber(String trackingNumber); - Builder trackingUrl(String trackingUrl); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder deliveryAddress(PostalAddress postalAddress); + @NotNull Builder deliveryAddress(PostalAddress.Builder postalAddress); + @NotNull Builder deliveryStatus(DeliveryEvent deliveryEvent); + @NotNull Builder deliveryStatus(DeliveryEvent.Builder deliveryEvent); + @NotNull Builder expectedArrivalFrom(java.util.Date date); + @NotNull Builder expectedArrivalUntil(java.util.Date date); + @NotNull Builder hasDeliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder hasDeliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder itemShipped(Product product); + @NotNull Builder itemShipped(Product.Builder product); + @NotNull Builder originAddress(PostalAddress postalAddress); + @NotNull Builder originAddress(PostalAddress.Builder postalAddress); + @NotNull Builder partOfOrder(IsPartOf isPartOf); + @NotNull Builder trackingNumber(String trackingNumber); + @NotNull Builder trackingUrl(String trackingUrl); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ParcelDelivery(PostalAddress deliveryAddress, DeliveryEvent deliveryStatus, java.util.Date expectedArrivalFrom, java.util.Date expectedArrivalUntil, DeliveryMethod hasDeliveryMethod, Product itemShipped, PostalAddress originAddress, IsPartOf partOfOrder, String trackingNumber, String trackingUrl, OrganizationOrPerson provider, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ParcelService.java b/src/main/java/org/schema/ParcelService.java index 798a9550..b4f50f25 100644 --- a/src/main/java/org/schema/ParcelService.java +++ b/src/main/java/org/schema/ParcelService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A private parcel service as the delivery mode available for a certain offer. *
@@ -33,7 +37,7 @@ public class ParcelService extends DeliveryMethod { /** * Builder for {@link ParcelService} */ - public static final class ParcelServiceThingBuilder implements Builder { + static final class ParcelServiceThingBuilder implements Builder { /** * Creates new {@link ParcelService} instance. */ @@ -43,7 +47,7 @@ public ParcelService build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -51,13 +55,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -65,27 +69,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -119,7 +123,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -154,7 +158,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -187,7 +191,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -195,38 +199,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -245,22 +249,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ParcelService(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ParentAudience.java b/src/main/java/org/schema/ParentAudience.java index fea3ccdb..e9a18d9a 100644 --- a/src/main/java/org/schema/ParentAudience.java +++ b/src/main/java/org/schema/ParentAudience.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A set of characteristics describing parents, who can be interested in viewing some content. */ @@ -37,7 +41,7 @@ public Number getChildMinAge() { /** * Builder for {@link ParentAudience} */ - public static final class ParentAudienceThingBuilder implements Builder { + static final class ParentAudienceThingBuilder implements Builder { /** * Creates new {@link ParentAudience} instance. */ @@ -47,15 +51,15 @@ public ParentAudience build() { /** * Maximal age of the child. */ - public Builder childMaxAge(Integer integer) { + @NotNull public Builder childMaxAge(int childMaxAge) { if (this.childMaxAge == null) this.childMaxAge = new Number(); - this.childMaxAge.setInteger(integer); + this.childMaxAge.setInt(childMaxAge); return this; } /** * Maximal age of the child. */ - public Builder childMaxAge(Long childMaxAge) { + @NotNull public Builder childMaxAge(long childMaxAge) { if (this.childMaxAge == null) this.childMaxAge = new Number(); this.childMaxAge.setLong(childMaxAge); return this; @@ -63,7 +67,7 @@ public Builder childMaxAge(Long childMaxAge) { /** * Maximal age of the child. */ - public Builder childMaxAge(Float childMaxAge) { + @NotNull public Builder childMaxAge(float childMaxAge) { if (this.childMaxAge == null) this.childMaxAge = new Number(); this.childMaxAge.setFloat(childMaxAge); return this; @@ -71,7 +75,7 @@ public Builder childMaxAge(Float childMaxAge) { /** * Maximal age of the child. */ - public Builder childMaxAge(Double childMaxAge) { + @NotNull public Builder childMaxAge(double childMaxAge) { if (this.childMaxAge == null) this.childMaxAge = new Number(); this.childMaxAge.setDouble(childMaxAge); return this; @@ -79,7 +83,7 @@ public Builder childMaxAge(Double childMaxAge) { /** * Maximal age of the child. */ - public Builder childMaxAge(String childMaxAge) { + @NotNull public Builder childMaxAge(String childMaxAge) { if (this.childMaxAge == null) this.childMaxAge = new Number(); this.childMaxAge.setString(childMaxAge); return this; @@ -87,15 +91,15 @@ public Builder childMaxAge(String childMaxAge) { /** * Minimal age of the child. */ - public Builder childMinAge(Integer integer) { + @NotNull public Builder childMinAge(int childMinAge) { if (this.childMinAge == null) this.childMinAge = new Number(); - this.childMinAge.setInteger(integer); + this.childMinAge.setInt(childMinAge); return this; } /** * Minimal age of the child. */ - public Builder childMinAge(Long childMinAge) { + @NotNull public Builder childMinAge(long childMinAge) { if (this.childMinAge == null) this.childMinAge = new Number(); this.childMinAge.setLong(childMinAge); return this; @@ -103,7 +107,7 @@ public Builder childMinAge(Long childMinAge) { /** * Minimal age of the child. */ - public Builder childMinAge(Float childMinAge) { + @NotNull public Builder childMinAge(float childMinAge) { if (this.childMinAge == null) this.childMinAge = new Number(); this.childMinAge.setFloat(childMinAge); return this; @@ -111,7 +115,7 @@ public Builder childMinAge(Float childMinAge) { /** * Minimal age of the child. */ - public Builder childMinAge(Double childMinAge) { + @NotNull public Builder childMinAge(double childMinAge) { if (this.childMinAge == null) this.childMinAge = new Number(); this.childMinAge.setDouble(childMinAge); return this; @@ -119,7 +123,7 @@ public Builder childMinAge(Double childMinAge) { /** * Minimal age of the child. */ - public Builder childMinAge(String childMinAge) { + @NotNull public Builder childMinAge(String childMinAge) { if (this.childMinAge == null) this.childMinAge = new Number(); this.childMinAge.setString(childMinAge); return this; @@ -127,56 +131,56 @@ public Builder childMinAge(String childMinAge) { /** * Expectations for health conditions of target audience. */ - public Builder healthCondition(MedicalCondition medicalCondition) { + @NotNull public Builder healthCondition(MedicalCondition medicalCondition) { this.healthCondition = medicalCondition; return this; } /** * Expectations for health conditions of target audience. */ - public Builder healthCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder healthCondition(MedicalCondition.Builder medicalCondition) { return this.healthCondition(medicalCondition.build()); } /** * Audiences defined by a person's gender. */ - public Builder requiredGender(String requiredGender) { + @NotNull public Builder requiredGender(String requiredGender) { this.requiredGender = requiredGender; return this; } /** * Audiences defined by a person's maximum age. */ - public Builder requiredMaxAge(Integer integer) { - this.requiredMaxAge = integer; + @NotNull public Builder requiredMaxAge(int requiredMaxAge) { + this.requiredMaxAge = requiredMaxAge; return this; } /** * Audiences defined by a person's minimum age. */ - public Builder requiredMinAge(Integer integer) { - this.requiredMinAge = integer; + @NotNull public Builder requiredMinAge(int requiredMinAge) { + this.requiredMinAge = requiredMinAge; return this; } /** * The gender of the person or audience. */ - public Builder suggestedGender(String suggestedGender) { + @NotNull public Builder suggestedGender(String suggestedGender) { this.suggestedGender = suggestedGender; return this; } /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Integer integer) { + @NotNull public Builder suggestedMaxAge(int suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); - this.suggestedMaxAge.setInteger(integer); + this.suggestedMaxAge.setInt(suggestedMaxAge); return this; } /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Long suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(long suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setLong(suggestedMaxAge); return this; @@ -184,7 +188,7 @@ public Builder suggestedMaxAge(Long suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Float suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(float suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setFloat(suggestedMaxAge); return this; @@ -192,7 +196,7 @@ public Builder suggestedMaxAge(Float suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Double suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(double suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setDouble(suggestedMaxAge); return this; @@ -200,7 +204,7 @@ public Builder suggestedMaxAge(Double suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(String suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(String suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setString(suggestedMaxAge); return this; @@ -208,15 +212,15 @@ public Builder suggestedMaxAge(String suggestedMaxAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Integer integer) { + @NotNull public Builder suggestedMinAge(int suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); - this.suggestedMinAge.setInteger(integer); + this.suggestedMinAge.setInt(suggestedMinAge); return this; } /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Long suggestedMinAge) { + @NotNull public Builder suggestedMinAge(long suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setLong(suggestedMinAge); return this; @@ -224,7 +228,7 @@ public Builder suggestedMinAge(Long suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Float suggestedMinAge) { + @NotNull public Builder suggestedMinAge(float suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setFloat(suggestedMinAge); return this; @@ -232,7 +236,7 @@ public Builder suggestedMinAge(Float suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Double suggestedMinAge) { + @NotNull public Builder suggestedMinAge(double suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setDouble(suggestedMinAge); return this; @@ -240,7 +244,7 @@ public Builder suggestedMinAge(Double suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(String suggestedMinAge) { + @NotNull public Builder suggestedMinAge(String suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setString(suggestedMinAge); return this; @@ -248,41 +252,41 @@ public Builder suggestedMinAge(String suggestedMinAge) { /** * The target group associated with a given audience (e.g. veterans, car owners, musicians, etc.). */ - public Builder audienceType(String audienceType) { + @NotNull public Builder audienceType(String audienceType) { this.audienceType = audienceType; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea administrativeArea) { this.geographicArea = administrativeArea; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { return this.geographicArea(administrativeArea.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -316,7 +320,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -351,7 +355,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -392,38 +396,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -434,8 +438,8 @@ public Builder id(long id) { private Number childMinAge; private MedicalCondition healthCondition; private String requiredGender; - private Integer requiredMaxAge; - private Integer requiredMinAge; + private int requiredMaxAge; + private int requiredMinAge; private String suggestedGender; private Number suggestedMaxAge; private Number suggestedMinAge; @@ -452,50 +456,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder childMaxAge(Integer integer); - Builder childMaxAge(Long childMaxAge); - Builder childMaxAge(Float childMaxAge); - Builder childMaxAge(Double childMaxAge); - Builder childMaxAge(String childMaxAge); - Builder childMinAge(Integer integer); - Builder childMinAge(Long childMinAge); - Builder childMinAge(Float childMinAge); - Builder childMinAge(Double childMinAge); - Builder childMinAge(String childMinAge); - Builder healthCondition(MedicalCondition medicalCondition); - Builder healthCondition(MedicalCondition.Builder medicalCondition); - Builder requiredGender(String requiredGender); - Builder requiredMaxAge(Integer integer); - Builder requiredMinAge(Integer integer); - Builder suggestedGender(String suggestedGender); - Builder suggestedMaxAge(Integer integer); - Builder suggestedMaxAge(Long suggestedMaxAge); - Builder suggestedMaxAge(Float suggestedMaxAge); - Builder suggestedMaxAge(Double suggestedMaxAge); - Builder suggestedMaxAge(String suggestedMaxAge); - Builder suggestedMinAge(Integer integer); - Builder suggestedMinAge(Long suggestedMinAge); - Builder suggestedMinAge(Float suggestedMinAge); - Builder suggestedMinAge(Double suggestedMinAge); - Builder suggestedMinAge(String suggestedMinAge); - Builder audienceType(String audienceType); - Builder geographicArea(AdministrativeArea administrativeArea); - Builder geographicArea(AdministrativeArea.Builder administrativeArea); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder childMaxAge(int childMaxAge); + @NotNull Builder childMaxAge(long childMaxAge); + @NotNull Builder childMaxAge(float childMaxAge); + @NotNull Builder childMaxAge(double childMaxAge); + @NotNull Builder childMaxAge(String childMaxAge); + @NotNull Builder childMinAge(int childMinAge); + @NotNull Builder childMinAge(long childMinAge); + @NotNull Builder childMinAge(float childMinAge); + @NotNull Builder childMinAge(double childMinAge); + @NotNull Builder childMinAge(String childMinAge); + @NotNull Builder healthCondition(MedicalCondition medicalCondition); + @NotNull Builder healthCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder requiredGender(String requiredGender); + @NotNull Builder requiredMaxAge(int requiredMaxAge); + @NotNull Builder requiredMinAge(int requiredMinAge); + @NotNull Builder suggestedGender(String suggestedGender); + @NotNull Builder suggestedMaxAge(int suggestedMaxAge); + @NotNull Builder suggestedMaxAge(long suggestedMaxAge); + @NotNull Builder suggestedMaxAge(float suggestedMaxAge); + @NotNull Builder suggestedMaxAge(double suggestedMaxAge); + @NotNull Builder suggestedMaxAge(String suggestedMaxAge); + @NotNull Builder suggestedMinAge(int suggestedMinAge); + @NotNull Builder suggestedMinAge(long suggestedMinAge); + @NotNull Builder suggestedMinAge(float suggestedMinAge); + @NotNull Builder suggestedMinAge(double suggestedMinAge); + @NotNull Builder suggestedMinAge(String suggestedMinAge); + @NotNull Builder audienceType(String audienceType); + @NotNull Builder geographicArea(AdministrativeArea administrativeArea); + @NotNull Builder geographicArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected ParentAudience(Number childMaxAge, Number childMinAge, 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) { + protected ParentAudience(Number childMaxAge, Number childMinAge, MedicalCondition healthCondition, String requiredGender, int requiredMaxAge, int 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); myChildMaxAge = childMaxAge; myChildMinAge = childMinAge; diff --git a/src/main/java/org/schema/Park.java b/src/main/java/org/schema/Park.java index 3d2f1491..1cf96690 100644 --- a/src/main/java/org/schema/Park.java +++ b/src/main/java/org/schema/Park.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A park. */ @@ -25,7 +29,7 @@ public class Park extends CivicStructure { /** * Builder for {@link Park} */ - public static final class ParkThingBuilder implements Builder { + static final class ParkThingBuilder implements Builder { /** * Creates new {@link Park} instance. */ @@ -35,73 +39,73 @@ public Park build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ParkingFacility.java b/src/main/java/org/schema/ParkingFacility.java index 040e8303..7efaf7be 100644 --- a/src/main/java/org/schema/ParkingFacility.java +++ b/src/main/java/org/schema/ParkingFacility.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A parking lot or other parking facility. */ @@ -25,7 +29,7 @@ public class ParkingFacility extends CivicStructure { /** * Builder for {@link ParkingFacility} */ - public static final class ParkingFacilityThingBuilder implements Builder { + static final class ParkingFacilityThingBuilder implements Builder { /** * Creates new {@link ParkingFacility} instance. */ @@ -35,73 +39,73 @@ public ParkingFacility build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ParkingMap.java b/src/main/java/org/schema/ParkingMap.java index 51d891f4..9d509797 100644 --- a/src/main/java/org/schema/ParkingMap.java +++ b/src/main/java/org/schema/ParkingMap.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A parking map. */ @@ -25,7 +29,7 @@ public class ParkingMap { /** * Builder for {@link ParkingMap} */ - public static final class ParkingMapThingBuilder implements Builder { + static final class ParkingMapThingBuilder implements Builder { /** * Creates new {@link ParkingMap} instance. */ @@ -34,7 +38,7 @@ public ParkingMap build() { } } public interface Builder extends ThingBuilder { - + } protected ParkingMap() { diff --git a/src/main/java/org/schema/Participant.java b/src/main/java/org/schema/Participant.java index 387052d8..02c399d8 100644 --- a/src/main/java/org/schema/Participant.java +++ b/src/main/java/org/schema/Participant.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** */ public interface Participant { diff --git a/src/main/java/org/schema/Pathology.java b/src/main/java/org/schema/Pathology.java index 46a26b93..2d1de537 100644 --- a/src/main/java/org/schema/Pathology.java +++ b/src/main/java/org/schema/Pathology.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that is concerned with the study of the cause, origin and nature of a disease state, including its consequences as a result of manifestation of the disease. In clinical care, the term is used to designate a branch of medicine using laboratory tests to diagnose and determine the prognostic significance of illness. */ @@ -25,7 +29,7 @@ public class Pathology { /** * Builder for {@link Pathology} */ - public static final class PathologyThingBuilder implements Builder { + static final class PathologyThingBuilder implements Builder { /** * Creates new {@link Pathology} instance. */ @@ -34,7 +38,7 @@ public Pathology build() { } } public interface Builder extends ThingBuilder { - + } protected Pathology() { diff --git a/src/main/java/org/schema/PathologyTest.java b/src/main/java/org/schema/PathologyTest.java index 1dd1d0a8..ed0a82a4 100644 --- a/src/main/java/org/schema/PathologyTest.java +++ b/src/main/java/org/schema/PathologyTest.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical test performed by a laboratory that typically involves examination of a tissue sample by a pathologist. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -32,7 +36,7 @@ public String getTissueSample() { /** * Builder for {@link PathologyTest} */ - public static final class PathologyTestThingBuilder implements Builder { + static final class PathologyTestThingBuilder implements Builder { /** * Creates new {@link PathologyTest} instance. */ @@ -42,165 +46,165 @@ public PathologyTest build() { /** * The type of tissue sample required for the test. */ - public Builder tissueSample(String tissueSample) { + @NotNull public Builder tissueSample(String tissueSample) { this.tissueSample = tissueSample; return this; } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug drug) { + @NotNull public Builder affectedBy(Drug drug) { this.affectedBy = drug; return this; } /** * Drugs that affect the test's results. */ - public Builder affectedBy(Drug.Builder drug) { + @NotNull public Builder affectedBy(Drug.Builder drug) { return this.affectedBy(drug.build()); } /** * Range of acceptable values for a typical patient, when applicable. */ - public Builder normalRange(String normalRange) { + @NotNull public Builder normalRange(String normalRange) { this.normalRange = normalRange; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign medicalSign) { + @NotNull public Builder signDetected(MedicalSign medicalSign) { this.signDetected = medicalSign; return this; } /** * A sign detected by the test. */ - public Builder signDetected(MedicalSign.Builder medicalSign) { + @NotNull public Builder signDetected(MedicalSign.Builder medicalSign) { return this.signDetected(medicalSign.build()); } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition medicalCondition) { this.usedToDiagnose = medicalCondition; return this; } /** * A condition the test is used to diagnose. */ - public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder usedToDiagnose(MedicalCondition.Builder medicalCondition) { return this.usedToDiagnose(medicalCondition.build()); } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice medicalDevice) { this.usesDevice = medicalDevice; return this; } /** * Device used to perform the test. */ - public Builder usesDevice(MedicalDevice.Builder medicalDevice) { + @NotNull public Builder usesDevice(MedicalDevice.Builder medicalDevice) { return this.usesDevice(medicalDevice.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -234,7 +238,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -269,7 +273,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -302,7 +306,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -310,38 +314,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -371,40 +375,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder tissueSample(String tissueSample); - Builder affectedBy(Drug drug); - Builder affectedBy(Drug.Builder drug); - Builder normalRange(String normalRange); - Builder signDetected(MedicalSign medicalSign); - Builder signDetected(MedicalSign.Builder medicalSign); - Builder usedToDiagnose(MedicalCondition medicalCondition); - Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); - Builder usesDevice(MedicalDevice medicalDevice); - Builder usesDevice(MedicalDevice.Builder medicalDevice); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder tissueSample(String tissueSample); + @NotNull Builder affectedBy(Drug drug); + @NotNull Builder affectedBy(Drug.Builder drug); + @NotNull Builder normalRange(String normalRange); + @NotNull Builder signDetected(MedicalSign medicalSign); + @NotNull Builder signDetected(MedicalSign.Builder medicalSign); + @NotNull Builder usedToDiagnose(MedicalCondition medicalCondition); + @NotNull Builder usedToDiagnose(MedicalCondition.Builder medicalCondition); + @NotNull Builder usesDevice(MedicalDevice medicalDevice); + @NotNull Builder usesDevice(MedicalDevice.Builder medicalDevice); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PathologyTest(String tissueSample, 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) { diff --git a/src/main/java/org/schema/Patient.java b/src/main/java/org/schema/Patient.java index c9feca53..82afd6b2 100644 --- a/src/main/java/org/schema/Patient.java +++ b/src/main/java/org/schema/Patient.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Patients. */ @@ -25,7 +29,7 @@ public class Patient { /** * Builder for {@link Patient} */ - public static final class PatientThingBuilder implements Builder { + static final class PatientThingBuilder implements Builder { /** * Creates new {@link Patient} instance. */ @@ -34,7 +38,7 @@ public Patient build() { } } public interface Builder extends ThingBuilder { - + } protected Patient() { diff --git a/src/main/java/org/schema/PawnShop.java b/src/main/java/org/schema/PawnShop.java index 43fd4bb5..a5ac5cbd 100644 --- a/src/main/java/org/schema/PawnShop.java +++ b/src/main/java/org/schema/PawnShop.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A shop that will buy, or lend money against the security of, personal possessions. */ @@ -25,7 +29,7 @@ public class PawnShop extends Store { /** * Builder for {@link PawnShop} */ - public static final class PawnShopThingBuilder implements Builder { + static final class PawnShopThingBuilder implements Builder { /** * Creates new {@link PawnShop} instance. */ @@ -35,107 +39,107 @@ public PawnShop build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PayAction.java b/src/main/java/org/schema/PayAction.java index bf74fb64..bcb69cc9 100644 --- a/src/main/java/org/schema/PayAction.java +++ b/src/main/java/org/schema/PayAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent pays a price to a participant. */ @@ -37,7 +41,7 @@ public AudienceOrOrganizationOrPerson getRecipient() { /** * Builder for {@link PayAction} */ - public static final class PayActionThingBuilder implements Builder { + static final class PayActionThingBuilder implements Builder { /** * Creates new {@link PayAction} instance. */ @@ -47,7 +51,7 @@ public PayAction build() { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setMedicalDevicePurpose(medicalDevicePurpose); return this; @@ -55,13 +59,13 @@ public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { return this.purpose(medicalDevicePurpose.build()); } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing thing) { + @NotNull public Builder purpose(Thing thing) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setThing(thing); return this; @@ -69,13 +73,13 @@ public Builder purpose(Thing thing) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing.Builder thing) { + @NotNull public Builder purpose(Thing.Builder thing) { return this.purpose(thing.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -83,13 +87,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -97,13 +101,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -111,7 +115,7 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** @@ -137,7 +141,7 @@ public Builder recipient(Person.Builder person) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -165,7 +169,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -173,20 +177,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -194,13 +198,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -208,7 +212,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -216,7 +220,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -225,67 +229,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -319,7 +323,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -354,7 +358,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -387,7 +391,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -395,38 +399,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -454,44 +458,44 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder purpose(MedicalDevicePurpose medicalDevicePurpose); - Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); - Builder purpose(Thing thing); - Builder purpose(Thing.Builder thing); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder purpose(MedicalDevicePurpose medicalDevicePurpose); + @NotNull Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); + @NotNull Builder purpose(Thing thing); + @NotNull Builder purpose(Thing.Builder thing); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/PaymentChargeSpecification.java b/src/main/java/org/schema/PaymentChargeSpecification.java index 1b907a51..3e28274a 100644 --- a/src/main/java/org/schema/PaymentChargeSpecification.java +++ b/src/main/java/org/schema/PaymentChargeSpecification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The costs of settling the payment using a particular payment method. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -38,7 +42,7 @@ public PaymentMethod getAppliesToPaymentMethod() { /** * Builder for {@link PaymentChargeSpecification} */ - public static final class PaymentChargeSpecificationThingBuilder implements Builder { + static final class PaymentChargeSpecificationThingBuilder implements Builder { /** * Creates new {@link PaymentChargeSpecification} instance. */ @@ -48,67 +52,67 @@ public PaymentChargeSpecification build() { /** * The delivery method(s) to which the delivery charge or payment charge specification applies. */ - public Builder appliesToDeliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder appliesToDeliveryMethod(DeliveryMethod deliveryMethod) { this.appliesToDeliveryMethod = deliveryMethod; return this; } /** * The delivery method(s) to which the delivery charge or payment charge specification applies. */ - public Builder appliesToDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder appliesToDeliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.appliesToDeliveryMethod(deliveryMethod.build()); } /** * The payment method(s) to which the payment charge specification applies. */ - public Builder appliesToPaymentMethod(PaymentMethod paymentMethod) { + @NotNull public Builder appliesToPaymentMethod(PaymentMethod paymentMethod) { this.appliesToPaymentMethod = paymentMethod; return this; } /** * The payment method(s) to which the payment charge specification applies. */ - public Builder appliesToPaymentMethod(PaymentMethod.Builder paymentMethod) { + @NotNull public Builder appliesToPaymentMethod(PaymentMethod.Builder paymentMethod) { return this.appliesToPaymentMethod(paymentMethod.build()); } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { this.eligibleQuantity = quantitativeValue; return this; } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { return this.eligibleQuantity(quantitativeValue.build()); } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { this.eligibleTransactionVolume = priceSpecification; return this; } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { return this.eligibleTransactionVolume(priceSpecification.build()); } /** * The highest price if the price is a range. */ - public Builder maxPrice(Integer integer) { + @NotNull public Builder maxPrice(int maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); - this.maxPrice.setInteger(integer); + this.maxPrice.setInt(maxPrice); return this; } /** * The highest price if the price is a range. */ - public Builder maxPrice(Long maxPrice) { + @NotNull public Builder maxPrice(long maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setLong(maxPrice); return this; @@ -116,7 +120,7 @@ public Builder maxPrice(Long maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(Float maxPrice) { + @NotNull public Builder maxPrice(float maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setFloat(maxPrice); return this; @@ -124,7 +128,7 @@ public Builder maxPrice(Float maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(Double maxPrice) { + @NotNull public Builder maxPrice(double maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setDouble(maxPrice); return this; @@ -132,7 +136,7 @@ public Builder maxPrice(Double maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(String maxPrice) { + @NotNull public Builder maxPrice(String maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setString(maxPrice); return this; @@ -140,15 +144,15 @@ public Builder maxPrice(String maxPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Integer integer) { + @NotNull public Builder minPrice(int minPrice) { if (this.minPrice == null) this.minPrice = new Number(); - this.minPrice.setInteger(integer); + this.minPrice.setInt(minPrice); return this; } /** * The lowest price if the price is a range. */ - public Builder minPrice(Long minPrice) { + @NotNull public Builder minPrice(long minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setLong(minPrice); return this; @@ -156,7 +160,7 @@ public Builder minPrice(Long minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Float minPrice) { + @NotNull public Builder minPrice(float minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setFloat(minPrice); return this; @@ -164,7 +168,7 @@ public Builder minPrice(Float minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Double minPrice) { + @NotNull public Builder minPrice(double minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setDouble(minPrice); return this; @@ -172,7 +176,7 @@ public Builder minPrice(Double minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(String minPrice) { + @NotNull public Builder minPrice(String minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setString(minPrice); return this; @@ -200,7 +204,7 @@ public Builder minPrice(String minPrice) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -228,7 +232,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -236,49 +240,49 @@ public Builder price(String price) { /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The end of the validity of offer, price specification, or opening hours data. */ - public Builder validThrough(java.util.Date date) { + @NotNull public Builder validThrough(java.util.Date date) { this.validThrough = date; return this; } /** * Specifies whether the applicable value-added tax (VAT) is included in the price specification or not. */ - public Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded) { + @NotNull public Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded) { this.valueAddedTaxIncluded = valueAddedTaxIncluded; return this; } /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -312,7 +316,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -347,7 +351,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -380,7 +384,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -388,38 +392,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,42 +452,42 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder appliesToDeliveryMethod(DeliveryMethod deliveryMethod); - Builder appliesToDeliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder appliesToPaymentMethod(PaymentMethod paymentMethod); - Builder appliesToPaymentMethod(PaymentMethod.Builder paymentMethod); - Builder eligibleQuantity(QuantitativeValue quantitativeValue); - Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); - Builder eligibleTransactionVolume(PriceSpecification priceSpecification); - Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); - Builder maxPrice(Integer integer); - Builder maxPrice(Long maxPrice); - Builder maxPrice(Float maxPrice); - Builder maxPrice(Double maxPrice); - Builder maxPrice(String maxPrice); - Builder minPrice(Integer integer); - Builder minPrice(Long minPrice); - Builder minPrice(Float minPrice); - Builder minPrice(Double minPrice); - Builder minPrice(String minPrice); - Builder price(Number number); - Builder price(String price); - Builder validFrom(java.util.Date date); - Builder validThrough(java.util.Date date); - Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded); - Builder priceCurrency(String priceCurrency); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder appliesToDeliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder appliesToDeliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder appliesToPaymentMethod(PaymentMethod paymentMethod); + @NotNull Builder appliesToPaymentMethod(PaymentMethod.Builder paymentMethod); + @NotNull Builder eligibleQuantity(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleTransactionVolume(PriceSpecification priceSpecification); + @NotNull Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); + @NotNull Builder maxPrice(int maxPrice); + @NotNull Builder maxPrice(long maxPrice); + @NotNull Builder maxPrice(float maxPrice); + @NotNull Builder maxPrice(double maxPrice); + @NotNull Builder maxPrice(String maxPrice); + @NotNull Builder minPrice(int minPrice); + @NotNull Builder minPrice(long minPrice); + @NotNull Builder minPrice(float minPrice); + @NotNull Builder minPrice(double minPrice); + @NotNull Builder minPrice(String minPrice); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validThrough(java.util.Date date); + @NotNull Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/PaymentMethod.java b/src/main/java/org/schema/PaymentMethod.java index 1cd95dd3..2a249ab6 100644 --- a/src/main/java/org/schema/PaymentMethod.java +++ b/src/main/java/org/schema/PaymentMethod.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A payment method is a standardized procedure for transferring the monetary amount for a purchase. Payment methods are characterized by the legal and technical structures used, and by the organization or group carrying out the transaction. *
@@ -39,7 +43,7 @@ public class PaymentMethod extends Enumeration { /** * Builder for {@link PaymentMethod} */ - public static final class PaymentMethodThingBuilder implements Builder { + static final class PaymentMethodThingBuilder implements Builder { /** * Creates new {@link PaymentMethod} instance. */ @@ -49,7 +53,7 @@ public PaymentMethod build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -57,13 +61,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -71,27 +75,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -125,7 +129,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -160,7 +164,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -193,7 +197,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -201,38 +205,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -251,22 +255,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PaymentMethod(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Pediatric.java b/src/main/java/org/schema/Pediatric.java index 4d0bf268..21a70e60 100644 --- a/src/main/java/org/schema/Pediatric.java +++ b/src/main/java/org/schema/Pediatric.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that specializes in the care of infants, children and adolescents. */ @@ -25,7 +29,7 @@ public class Pediatric { /** * Builder for {@link Pediatric} */ - public static final class PediatricThingBuilder implements Builder { + static final class PediatricThingBuilder implements Builder { /** * Creates new {@link Pediatric} instance. */ @@ -34,7 +38,7 @@ public Pediatric build() { } } public interface Builder extends ThingBuilder { - + } protected Pediatric() { diff --git a/src/main/java/org/schema/PeopleAudience.java b/src/main/java/org/schema/PeopleAudience.java index a3aa0e60..7be8c04b 100644 --- a/src/main/java/org/schema/PeopleAudience.java +++ b/src/main/java/org/schema/PeopleAudience.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A set of characteristics belonging to people, e.g. who compose an item's target audience. */ @@ -37,13 +41,13 @@ public String getRequiredGender() { /** * Audiences defined by a person's maximum age. */ - public Integer getRequiredMaxAge() { + public int getRequiredMaxAge() { return myRequiredMaxAge; } /** * Audiences defined by a person's minimum age. */ - public Integer getRequiredMinAge() { + public int getRequiredMinAge() { return myRequiredMinAge; } /** @@ -67,7 +71,7 @@ public Number getSuggestedMinAge() { /** * Builder for {@link PeopleAudience} */ - public static final class PeopleAudienceThingBuilder implements Builder { + static final class PeopleAudienceThingBuilder implements Builder { /** * Creates new {@link PeopleAudience} instance. */ @@ -77,56 +81,56 @@ public PeopleAudience build() { /** * Expectations for health conditions of target audience. */ - public Builder healthCondition(MedicalCondition medicalCondition) { + @NotNull public Builder healthCondition(MedicalCondition medicalCondition) { this.healthCondition = medicalCondition; return this; } /** * Expectations for health conditions of target audience. */ - public Builder healthCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder healthCondition(MedicalCondition.Builder medicalCondition) { return this.healthCondition(medicalCondition.build()); } /** * Audiences defined by a person's gender. */ - public Builder requiredGender(String requiredGender) { + @NotNull public Builder requiredGender(String requiredGender) { this.requiredGender = requiredGender; return this; } /** * Audiences defined by a person's maximum age. */ - public Builder requiredMaxAge(Integer integer) { - this.requiredMaxAge = integer; + @NotNull public Builder requiredMaxAge(int requiredMaxAge) { + this.requiredMaxAge = requiredMaxAge; return this; } /** * Audiences defined by a person's minimum age. */ - public Builder requiredMinAge(Integer integer) { - this.requiredMinAge = integer; + @NotNull public Builder requiredMinAge(int requiredMinAge) { + this.requiredMinAge = requiredMinAge; return this; } /** * The gender of the person or audience. */ - public Builder suggestedGender(String suggestedGender) { + @NotNull public Builder suggestedGender(String suggestedGender) { this.suggestedGender = suggestedGender; return this; } /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Integer integer) { + @NotNull public Builder suggestedMaxAge(int suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); - this.suggestedMaxAge.setInteger(integer); + this.suggestedMaxAge.setInt(suggestedMaxAge); return this; } /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Long suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(long suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setLong(suggestedMaxAge); return this; @@ -134,7 +138,7 @@ public Builder suggestedMaxAge(Long suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Float suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(float suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setFloat(suggestedMaxAge); return this; @@ -142,7 +146,7 @@ public Builder suggestedMaxAge(Float suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(Double suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(double suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setDouble(suggestedMaxAge); return this; @@ -150,7 +154,7 @@ public Builder suggestedMaxAge(Double suggestedMaxAge) { /** * Maximal age recommended for viewing content. */ - public Builder suggestedMaxAge(String suggestedMaxAge) { + @NotNull public Builder suggestedMaxAge(String suggestedMaxAge) { if (this.suggestedMaxAge == null) this.suggestedMaxAge = new Number(); this.suggestedMaxAge.setString(suggestedMaxAge); return this; @@ -158,15 +162,15 @@ public Builder suggestedMaxAge(String suggestedMaxAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Integer integer) { + @NotNull public Builder suggestedMinAge(int suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); - this.suggestedMinAge.setInteger(integer); + this.suggestedMinAge.setInt(suggestedMinAge); return this; } /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Long suggestedMinAge) { + @NotNull public Builder suggestedMinAge(long suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setLong(suggestedMinAge); return this; @@ -174,7 +178,7 @@ public Builder suggestedMinAge(Long suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Float suggestedMinAge) { + @NotNull public Builder suggestedMinAge(float suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setFloat(suggestedMinAge); return this; @@ -182,7 +186,7 @@ public Builder suggestedMinAge(Float suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(Double suggestedMinAge) { + @NotNull public Builder suggestedMinAge(double suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setDouble(suggestedMinAge); return this; @@ -190,7 +194,7 @@ public Builder suggestedMinAge(Double suggestedMinAge) { /** * Minimal age recommended for viewing content. */ - public Builder suggestedMinAge(String suggestedMinAge) { + @NotNull public Builder suggestedMinAge(String suggestedMinAge) { if (this.suggestedMinAge == null) this.suggestedMinAge = new Number(); this.suggestedMinAge.setString(suggestedMinAge); return this; @@ -198,41 +202,41 @@ public Builder suggestedMinAge(String suggestedMinAge) { /** * The target group associated with a given audience (e.g. veterans, car owners, musicians, etc.). */ - public Builder audienceType(String audienceType) { + @NotNull public Builder audienceType(String audienceType) { this.audienceType = audienceType; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea administrativeArea) { this.geographicArea = administrativeArea; return this; } /** * The geographic area associated with the audience. */ - public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder geographicArea(AdministrativeArea.Builder administrativeArea) { return this.geographicArea(administrativeArea.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -266,7 +270,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -301,7 +305,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -334,7 +338,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -342,38 +346,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -382,8 +386,8 @@ public Builder id(long id) { } private MedicalCondition healthCondition; private String requiredGender; - private Integer requiredMaxAge; - private Integer requiredMinAge; + private int requiredMaxAge; + private int requiredMinAge; private String suggestedGender; private Number suggestedMaxAge; private Number suggestedMinAge; @@ -400,40 +404,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder healthCondition(MedicalCondition medicalCondition); - Builder healthCondition(MedicalCondition.Builder medicalCondition); - Builder requiredGender(String requiredGender); - Builder requiredMaxAge(Integer integer); - Builder requiredMinAge(Integer integer); - Builder suggestedGender(String suggestedGender); - Builder suggestedMaxAge(Integer integer); - Builder suggestedMaxAge(Long suggestedMaxAge); - Builder suggestedMaxAge(Float suggestedMaxAge); - Builder suggestedMaxAge(Double suggestedMaxAge); - Builder suggestedMaxAge(String suggestedMaxAge); - Builder suggestedMinAge(Integer integer); - Builder suggestedMinAge(Long suggestedMinAge); - Builder suggestedMinAge(Float suggestedMinAge); - Builder suggestedMinAge(Double suggestedMinAge); - Builder suggestedMinAge(String suggestedMinAge); - Builder audienceType(String audienceType); - Builder geographicArea(AdministrativeArea administrativeArea); - Builder geographicArea(AdministrativeArea.Builder administrativeArea); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder healthCondition(MedicalCondition medicalCondition); + @NotNull Builder healthCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder requiredGender(String requiredGender); + @NotNull Builder requiredMaxAge(int requiredMaxAge); + @NotNull Builder requiredMinAge(int requiredMinAge); + @NotNull Builder suggestedGender(String suggestedGender); + @NotNull Builder suggestedMaxAge(int suggestedMaxAge); + @NotNull Builder suggestedMaxAge(long suggestedMaxAge); + @NotNull Builder suggestedMaxAge(float suggestedMaxAge); + @NotNull Builder suggestedMaxAge(double suggestedMaxAge); + @NotNull Builder suggestedMaxAge(String suggestedMaxAge); + @NotNull Builder suggestedMinAge(int suggestedMinAge); + @NotNull Builder suggestedMinAge(long suggestedMinAge); + @NotNull Builder suggestedMinAge(float suggestedMinAge); + @NotNull Builder suggestedMinAge(double suggestedMinAge); + @NotNull Builder suggestedMinAge(String suggestedMinAge); + @NotNull Builder audienceType(String audienceType); + @NotNull Builder geographicArea(AdministrativeArea administrativeArea); + @NotNull Builder geographicArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected PeopleAudience(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) { + protected PeopleAudience(MedicalCondition healthCondition, String requiredGender, int requiredMaxAge, int 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(audienceType, geographicArea, additionalType, alternateName, description, mainEntityOfPage, name, sameAs, url, potentialAction, id); myHealthCondition = healthCondition; myRequiredGender = requiredGender; @@ -445,8 +449,8 @@ protected PeopleAudience(MedicalCondition healthCondition, String requiredGender } private MedicalCondition myHealthCondition; private String myRequiredGender; - private Integer myRequiredMaxAge; - private Integer myRequiredMinAge; + private int myRequiredMaxAge; + private int myRequiredMinAge; private String mySuggestedGender; private Number mySuggestedMaxAge; private Number mySuggestedMinAge; diff --git a/src/main/java/org/schema/PercutaneousProcedure.java b/src/main/java/org/schema/PercutaneousProcedure.java index d0089063..12d448c5 100644 --- a/src/main/java/org/schema/PercutaneousProcedure.java +++ b/src/main/java/org/schema/PercutaneousProcedure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A type of medical procedure that involves percutaneous techniques, where access to organs or tissue is achieved via needle-puncture of the skin. For example, catheter-based procedures like stent delivery. */ @@ -25,7 +29,7 @@ public class PercutaneousProcedure { /** * Builder for {@link PercutaneousProcedure} */ - public static final class PercutaneousProcedureThingBuilder implements Builder { + static final class PercutaneousProcedureThingBuilder implements Builder { /** * Creates new {@link PercutaneousProcedure} instance. */ @@ -34,7 +38,7 @@ public PercutaneousProcedure build() { } } public interface Builder extends ThingBuilder { - + } protected PercutaneousProcedure() { diff --git a/src/main/java/org/schema/PerformAction.java b/src/main/java/org/schema/PerformAction.java index f42cda25..1072504b 100644 --- a/src/main/java/org/schema/PerformAction.java +++ b/src/main/java/org/schema/PerformAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of participating in performance arts. */ @@ -31,7 +35,7 @@ public EntertainmentBusiness getEntertainmentBusiness() { /** * Builder for {@link PerformAction} */ - public static final class PerformActionThingBuilder implements Builder { + static final class PerformActionThingBuilder implements Builder { /** * Creates new {@link PerformAction} instance. */ @@ -41,46 +45,46 @@ public PerformAction build() { /** * A sub property of location. The entertainment business where the action occurred. */ - public Builder entertainmentBusiness(EntertainmentBusiness entertainmentBusiness) { + @NotNull public Builder entertainmentBusiness(EntertainmentBusiness entertainmentBusiness) { this.entertainmentBusiness = entertainmentBusiness; return this; } /** * A sub property of location. The entertainment business where the action occurred. */ - public Builder entertainmentBusiness(EntertainmentBusiness.Builder entertainmentBusiness) { + @NotNull public Builder entertainmentBusiness(EntertainmentBusiness.Builder entertainmentBusiness) { return this.entertainmentBusiness(entertainmentBusiness.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -88,13 +92,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -102,7 +106,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -110,7 +114,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -119,67 +123,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -213,7 +217,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -248,7 +252,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -281,7 +285,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -289,38 +293,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -347,36 +351,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder entertainmentBusiness(EntertainmentBusiness entertainmentBusiness); - Builder entertainmentBusiness(EntertainmentBusiness.Builder entertainmentBusiness); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder event(Event event); - Builder event(Event.Builder event); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder entertainmentBusiness(EntertainmentBusiness entertainmentBusiness); + @NotNull Builder entertainmentBusiness(EntertainmentBusiness.Builder entertainmentBusiness); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PerformAction(EntertainmentBusiness entertainmentBusiness, Audience audience, Event event, 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) { diff --git a/src/main/java/org/schema/PerformanceRole.java b/src/main/java/org/schema/PerformanceRole.java index 20e77959..ecd7b625 100644 --- a/src/main/java/org/schema/PerformanceRole.java +++ b/src/main/java/org/schema/PerformanceRole.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A PerformanceRole is a Role that some entity places with regard to a theatrical performance, e.g. in a Movie, TVSeries etc. */ @@ -31,7 +35,7 @@ public String getCharacterName() { /** * Builder for {@link PerformanceRole} */ - public static final class PerformanceRoleThingBuilder implements Builder { + static final class PerformanceRoleThingBuilder implements Builder { /** * Creates new {@link PerformanceRole} instance. */ @@ -41,42 +45,42 @@ public PerformanceRole build() { /** * The name of a character played in some acting or performing role, i.e. in a PerformanceRole. */ - public Builder characterName(String characterName) { + @NotNull public Builder characterName(String characterName) { this.characterName = characterName; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * A role played, performed or filled by a person or organization. For example, the team of creators for a comic book might fill the roles named 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might play in the position named 'Quarterback'. */ - public Builder roleName(String roleName) { + @NotNull public Builder roleName(String roleName) { this.roleName = roleName; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -110,7 +114,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -145,7 +149,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -178,7 +182,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -186,38 +190,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,21 +242,21 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder characterName(String characterName); - Builder startDate(java.util.Date date); - Builder roleName(String roleName); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder characterName(String characterName); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder roleName(String roleName); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PerformanceRole(String characterName, java.util.Date startDate, String roleName, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/PerformingArtsTheater.java b/src/main/java/org/schema/PerformingArtsTheater.java index ba65c747..7e961017 100644 --- a/src/main/java/org/schema/PerformingArtsTheater.java +++ b/src/main/java/org/schema/PerformingArtsTheater.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A theater or other performing art center. */ @@ -25,7 +29,7 @@ public class PerformingArtsTheater extends CivicStructure { /** * Builder for {@link PerformingArtsTheater} */ - public static final class PerformingArtsTheaterThingBuilder implements Builder { + static final class PerformingArtsTheaterThingBuilder implements Builder { /** * Creates new {@link PerformingArtsTheater} instance. */ @@ -35,73 +39,73 @@ public PerformingArtsTheater build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PerformingGroup.java b/src/main/java/org/schema/PerformingGroup.java index 9e7e528f..ae56d16f 100644 --- a/src/main/java/org/schema/PerformingGroup.java +++ b/src/main/java/org/schema/PerformingGroup.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A performance group, such as a band, an orchestra, or a circus. */ @@ -25,7 +29,7 @@ public class PerformingGroup extends Organization { /** * Builder for {@link PerformingGroup} */ - public static final class PerformingGroupThingBuilder implements Builder { + static final class PerformingGroupThingBuilder implements Builder { /** * Creates new {@link PerformingGroup} instance. */ @@ -35,40 +39,40 @@ public PerformingGroup build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -76,13 +80,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -90,147 +94,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -238,13 +242,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -252,20 +256,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -287,13 +291,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -301,13 +305,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -315,33 +319,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -349,13 +353,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -363,100 +367,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -490,7 +494,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -525,7 +529,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -558,7 +562,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -566,38 +570,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -647,78 +651,78 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Periodical.java b/src/main/java/org/schema/Periodical.java index 9d180ac6..96a3053d 100644 --- a/src/main/java/org/schema/Periodical.java +++ b/src/main/java/org/schema/Periodical.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A publication in any medium issued in successive parts bearing numerical or chronological designations and intended, such as a magazine, scholarly journal, or newspaper to continue indefinitely. * @@ -35,7 +39,7 @@ public String getIssn() { /** * Builder for {@link Periodical} */ - public static final class PeriodicalThingBuilder implements Builder { + static final class PeriodicalThingBuilder implements Builder { /** * Creates new {@link Periodical} instance. */ @@ -45,148 +49,148 @@ public Periodical build() { /** * The International Standard Serial Number (ISSN) that identifies this periodical. You can repeat this property to (for example) identify different formats of this periodical. */ - public Builder issn(String issn) { + @NotNull public Builder issn(String issn) { this.issn = issn; return this; } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -194,13 +198,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -208,20 +212,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -229,13 +233,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -243,40 +247,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -284,13 +288,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -298,13 +302,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -312,13 +316,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -326,21 +330,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -348,7 +352,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -356,7 +360,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -364,7 +368,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -372,7 +376,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -380,13 +384,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -394,101 +398,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -496,13 +500,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -510,35 +514,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -546,13 +550,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -560,53 +564,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -614,13 +618,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -628,127 +632,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -756,7 +760,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -764,7 +768,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -772,7 +776,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -780,20 +784,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -801,13 +805,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -815,66 +819,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -882,13 +886,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -896,40 +900,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -963,7 +967,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -998,7 +1002,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1031,7 +1035,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1039,38 +1043,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1136,7 +1140,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1154,147 +1158,147 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder issn(String issn); - Builder endDate(java.util.Date date); - Builder startDate(java.util.Date date); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder issn(String issn); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Periodical(String issn, 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) { + protected Periodical(String issn, 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, int 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); myIssn = issn; } diff --git a/src/main/java/org/schema/Permit.java b/src/main/java/org/schema/Permit.java index ff47eba1..65b1a3ba 100644 --- a/src/main/java/org/schema/Permit.java +++ b/src/main/java/org/schema/Permit.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A permit issued by an organization, e.g. a parking pass. */ @@ -43,7 +47,7 @@ public Duration getValidFor() { /** * The date when the item becomes valid. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidFrom() { return myValidFrom; } @@ -56,7 +60,7 @@ public AdministrativeArea getValidIn() { /** * The date when the item is no longer valid. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidUntil() { return myValidUntil; } @@ -69,7 +73,7 @@ public Organization getIssuedBy() { /** * Builder for {@link Permit} */ - public static final class PermitThingBuilder implements Builder { + static final class PermitThingBuilder implements Builder { /** * Creates new {@link Permit} instance. */ @@ -79,100 +83,100 @@ public Permit build() { /** * The service through with the permit was granted. */ - public Builder issuedThrough(Service service) { + @NotNull public Builder issuedThrough(Service service) { this.issuedThrough = service; return this; } /** * The service through with the permit was granted. */ - public Builder issuedThrough(Service.Builder service) { + @NotNull public Builder issuedThrough(Service.Builder service) { return this.issuedThrough(service.build()); } /** * The target audience for this permit. */ - public Builder permitAudience(Audience audience) { + @NotNull public Builder permitAudience(Audience audience) { this.permitAudience = audience; return this; } /** * The target audience for this permit. */ - public Builder permitAudience(Audience.Builder audience) { + @NotNull public Builder permitAudience(Audience.Builder audience) { return this.permitAudience(audience.build()); } /** * The time validity of the permit. */ - public Builder validFor(Duration duration) { + @NotNull public Builder validFor(Duration duration) { this.validFor = duration; return this; } /** * The time validity of the permit. */ - public Builder validFor(Duration.Builder duration) { + @NotNull public Builder validFor(Duration.Builder duration) { return this.validFor(duration.build()); } /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The geographic area where the permit is valid. */ - public Builder validIn(AdministrativeArea administrativeArea) { + @NotNull public Builder validIn(AdministrativeArea administrativeArea) { this.validIn = administrativeArea; return this; } /** * The geographic area where the permit is valid. */ - public Builder validIn(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder validIn(AdministrativeArea.Builder administrativeArea) { return this.validIn(administrativeArea.build()); } /** * The date when the item is no longer valid. */ - public Builder validUntil(java.util.Date date) { + @NotNull public Builder validUntil(java.util.Date date) { this.validUntil = date; return this; } /** * The organization issuing the ticket or permit. */ - public Builder issuedBy(Organization organization) { + @NotNull public Builder issuedBy(Organization organization) { this.issuedBy = organization; return this; } /** * The organization issuing the ticket or permit. */ - public Builder issuedBy(Organization.Builder organization) { + @NotNull public Builder issuedBy(Organization.Builder organization) { return this.issuedBy(organization.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -206,7 +210,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -241,7 +245,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -274,7 +278,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -282,38 +286,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -338,30 +342,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder issuedThrough(Service service); - Builder issuedThrough(Service.Builder service); - Builder permitAudience(Audience audience); - Builder permitAudience(Audience.Builder audience); - Builder validFor(Duration duration); - Builder validFor(Duration.Builder duration); - Builder validFrom(java.util.Date date); - Builder validIn(AdministrativeArea administrativeArea); - Builder validIn(AdministrativeArea.Builder administrativeArea); - Builder validUntil(java.util.Date date); - Builder issuedBy(Organization organization); - Builder issuedBy(Organization.Builder organization); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder issuedThrough(Service service); + @NotNull Builder issuedThrough(Service.Builder service); + @NotNull Builder permitAudience(Audience audience); + @NotNull Builder permitAudience(Audience.Builder audience); + @NotNull Builder validFor(Duration duration); + @NotNull Builder validFor(Duration.Builder duration); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validIn(AdministrativeArea administrativeArea); + @NotNull Builder validIn(AdministrativeArea.Builder administrativeArea); + @NotNull Builder validUntil(java.util.Date date); + @NotNull Builder issuedBy(Organization organization); + @NotNull Builder issuedBy(Organization.Builder organization); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Permit(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) { diff --git a/src/main/java/org/schema/Person.java b/src/main/java/org/schema/Person.java index a5bb8cc1..e5ee8886 100644 --- a/src/main/java/org/schema/Person.java +++ b/src/main/java/org/schema/Person.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A person (alive, dead, undead, or fictional). * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews @@ -57,7 +61,7 @@ public String getAward() { /** * Date of birth. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getBirthDate() { return myBirthDate; } @@ -88,7 +92,7 @@ public ContactPoint getContactPoint() { /** * Date of death. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDeathDate() { return myDeathDate; } @@ -311,7 +315,7 @@ public Place getDeathPlace() { /** * Builder for {@link Person} */ - public static final class PersonThingBuilder implements Builder { + static final class PersonThingBuilder implements Builder { /** * Creates new {@link Person} instance. */ @@ -321,67 +325,67 @@ public Person build() { /** * An additional name for a Person, can be used for a middle name. */ - public Builder additionalName(String additionalName) { + @NotNull public Builder additionalName(String additionalName) { this.additionalName = additionalName; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * An organization that this person is affiliated with. For example, a school/university, a club, or a team. */ - public Builder affiliation(Organization organization) { + @NotNull public Builder affiliation(Organization organization) { this.affiliation = organization; return this; } /** * An organization that this person is affiliated with. For example, a school/university, a club, or a team. */ - public Builder affiliation(Organization.Builder organization) { + @NotNull public Builder affiliation(Organization.Builder organization) { return this.affiliation(organization.build()); } /** * An educational organizations that the person is an alumni of. */ - public Builder alumniOf(EducationalOrganization educationalOrganization) { + @NotNull public Builder alumniOf(EducationalOrganization educationalOrganization) { this.alumniOf = educationalOrganization; return this; } /** * An educational organizations that the person is an alumni of. */ - public Builder alumniOf(EducationalOrganization.Builder educationalOrganization) { + @NotNull public Builder alumniOf(EducationalOrganization.Builder educationalOrganization) { return this.alumniOf(educationalOrganization.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * Date of birth. */ - public Builder birthDate(java.util.Date date) { + @NotNull public Builder birthDate(java.util.Date date) { this.birthDate = date; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -389,13 +393,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -403,134 +407,134 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A child of the person. */ - public Builder children(Person person) { + @NotNull public Builder children(Person person) { this.children = person; return this; } /** * A child of the person. */ - public Builder children(Person.Builder person) { + @NotNull public Builder children(Person.Builder person) { return this.children(person.build()); } /** * A colleague of the person. */ - public Builder colleague(Person person) { + @NotNull public Builder colleague(Person person) { this.colleague = person; return this; } /** * A colleague of the person. */ - public Builder colleague(Person.Builder person) { + @NotNull public Builder colleague(Person.Builder person) { return this.colleague(person.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * Date of death. */ - public Builder deathDate(java.util.Date date) { + @NotNull public Builder deathDate(java.util.Date date) { this.deathDate = date; return this; } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Family name. In the U.S., the last name of an Person. This can be used along with givenName instead of the name property. */ - public Builder familyName(String familyName) { + @NotNull public Builder familyName(String familyName) { this.familyName = familyName; return this; } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The most generic uni-directional social relation. */ - public Builder follows(Person person) { + @NotNull public Builder follows(Person person) { this.follows = person; return this; } /** * The most generic uni-directional social relation. */ - public Builder follows(Person.Builder person) { + @NotNull public Builder follows(Person.Builder person) { return this.follows(person.build()); } /** * Gender of the person. */ - public Builder gender(String gender) { + @NotNull public Builder gender(String gender) { this.gender = gender; return this; } /** * Given name. In the U.S., the first name of a Person. This can be used along with familyName instead of the name property. */ - public Builder givenName(String givenName) { + @NotNull public Builder givenName(String givenName) { this.givenName = givenName; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -538,13 +542,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -552,13 +556,13 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * A contact location for a person's residence. */ - public Builder homeLocation(ContactPoint contactPoint) { + @NotNull public Builder homeLocation(ContactPoint contactPoint) { if (this.homeLocation == null) this.homeLocation = new ContactPointOrPlace(); this.homeLocation.setContactPoint(contactPoint); return this; @@ -566,13 +570,13 @@ public Builder homeLocation(ContactPoint contactPoint) { /** * A contact location for a person's residence. */ - public Builder homeLocation(ContactPoint.Builder contactPoint) { + @NotNull public Builder homeLocation(ContactPoint.Builder contactPoint) { return this.homeLocation(contactPoint.build()); } /** * A contact location for a person's residence. */ - public Builder homeLocation(Place place) { + @NotNull public Builder homeLocation(Place place) { if (this.homeLocation == null) this.homeLocation = new ContactPointOrPlace(); this.homeLocation.setPlace(place); return this; @@ -580,67 +584,67 @@ public Builder homeLocation(Place place) { /** * A contact location for a person's residence. */ - public Builder homeLocation(Place.Builder place) { + @NotNull public Builder homeLocation(Place.Builder place) { return this.homeLocation(place.build()); } /** * An honorific prefix preceding a Person's name such as Dr/Mrs/Mr. */ - public Builder honorificPrefix(String honorificPrefix) { + @NotNull public Builder honorificPrefix(String honorificPrefix) { this.honorificPrefix = honorificPrefix; return this; } /** * An honorific suffix preceding a Person's name such as M.D. /PhD/MSCSW. */ - public Builder honorificSuffix(String honorificSuffix) { + @NotNull public Builder honorificSuffix(String honorificSuffix) { this.honorificSuffix = honorificSuffix; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The job title of the person (for example, Financial Manager). */ - public Builder jobTitle(String jobTitle) { + @NotNull public Builder jobTitle(String jobTitle) { this.jobTitle = jobTitle; return this; } /** * The most generic bi-directional social/work relation. */ - public Builder knows(Person person) { + @NotNull public Builder knows(Person person) { this.knows = person; return this; } /** * The most generic bi-directional social/work relation. */ - public Builder knows(Person.Builder person) { + @NotNull public Builder knows(Person.Builder person) { return this.knows(person.build()); } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -648,13 +652,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -662,46 +666,46 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * Nationality of the person. */ - public Builder nationality(Country country) { + @NotNull public Builder nationality(Country country) { this.nationality = country; return this; } /** * Nationality of the person. */ - public Builder nationality(Country.Builder country) { + @NotNull public Builder nationality(Country.Builder country) { return this.nationality(country.build()); } /** * The total financial value of the organization or person as calculated by subtracting assets from liabilities. */ - public Builder netWorth(PriceSpecification priceSpecification) { + @NotNull public Builder netWorth(PriceSpecification priceSpecification) { this.netWorth = priceSpecification; return this; } /** * The total financial value of the organization or person as calculated by subtracting assets from liabilities. */ - public Builder netWorth(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder netWorth(PriceSpecification.Builder priceSpecification) { return this.netWorth(priceSpecification.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -709,13 +713,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -723,125 +727,125 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A parent of this person. */ - public Builder parent(Person person) { + @NotNull public Builder parent(Person person) { this.parent = person; return this; } /** * A parent of this person. */ - public Builder parent(Person.Builder person) { + @NotNull public Builder parent(Person.Builder person) { return this.parent(person.build()); } /** * Event that this person is a performer or participant in. */ - public Builder performerIn(Event event) { + @NotNull public Builder performerIn(Event event) { this.performerIn = event; return this; } /** * Event that this person is a performer or participant in. */ - public Builder performerIn(Event.Builder event) { + @NotNull public Builder performerIn(Event.Builder event) { return this.performerIn(event.build()); } /** * The most generic familial relation. */ - public Builder relatedTo(Person person) { + @NotNull public Builder relatedTo(Person person) { this.relatedTo = person; return this; } /** * The most generic familial relation. */ - public Builder relatedTo(Person.Builder person) { + @NotNull public Builder relatedTo(Person.Builder person) { return this.relatedTo(person.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A sibling of the person. */ - public Builder sibling(Person person) { + @NotNull public Builder sibling(Person person) { this.sibling = person; return this; } /** * A sibling of the person. */ - public Builder sibling(Person.Builder person) { + @NotNull public Builder sibling(Person.Builder person) { return this.sibling(person.build()); } /** * The person's spouse. */ - public Builder spouse(Person person) { + @NotNull public Builder spouse(Person person) { this.spouse = person; return this; } /** * The person's spouse. */ - public Builder spouse(Person.Builder person) { + @NotNull public Builder spouse(Person.Builder person) { return this.spouse(person.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue quantitativeValue) { this.weight = quantitativeValue; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue.Builder quantitativeValue) { return this.weight(quantitativeValue.build()); } /** * A contact location for a person's place of work. */ - public Builder workLocation(ContactPoint contactPoint) { + @NotNull public Builder workLocation(ContactPoint contactPoint) { if (this.workLocation == null) this.workLocation = new ContactPointOrPlace(); this.workLocation.setContactPoint(contactPoint); return this; @@ -849,13 +853,13 @@ public Builder workLocation(ContactPoint contactPoint) { /** * A contact location for a person's place of work. */ - public Builder workLocation(ContactPoint.Builder contactPoint) { + @NotNull public Builder workLocation(ContactPoint.Builder contactPoint) { return this.workLocation(contactPoint.build()); } /** * A contact location for a person's place of work. */ - public Builder workLocation(Place place) { + @NotNull public Builder workLocation(Place place) { if (this.workLocation == null) this.workLocation = new ContactPointOrPlace(); this.workLocation.setPlace(place); return this; @@ -863,66 +867,66 @@ public Builder workLocation(Place place) { /** * A contact location for a person's place of work. */ - public Builder workLocation(Place.Builder place) { + @NotNull public Builder workLocation(Place.Builder place) { return this.workLocation(place.build()); } /** * Organizations that the person works for. */ - public Builder worksFor(Organization organization) { + @NotNull public Builder worksFor(Organization organization) { this.worksFor = organization; return this; } /** * Organizations that the person works for. */ - public Builder worksFor(Organization.Builder organization) { + @NotNull public Builder worksFor(Organization.Builder organization) { return this.worksFor(organization.build()); } /** * The place where the person was born. */ - public Builder birthPlace(Place place) { + @NotNull public Builder birthPlace(Place place) { this.birthPlace = place; return this; } /** * The place where the person was born. */ - public Builder birthPlace(Place.Builder place) { + @NotNull public Builder birthPlace(Place.Builder place) { return this.birthPlace(place.build()); } /** * The place where the person died. */ - public Builder deathPlace(Place place) { + @NotNull public Builder deathPlace(Place place) { this.deathPlace = place; return this; } /** * The place where the person died. */ - public Builder deathPlace(Place.Builder place) { + @NotNull public Builder deathPlace(Place.Builder place) { return this.deathPlace(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -956,7 +960,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -991,7 +995,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1024,7 +1028,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1032,38 +1036,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1128,105 +1132,105 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalName(String additionalName); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder affiliation(Organization organization); - Builder affiliation(Organization.Builder organization); - Builder alumniOf(EducationalOrganization educationalOrganization); - Builder alumniOf(EducationalOrganization.Builder educationalOrganization); - Builder award(String award); - Builder birthDate(java.util.Date date); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder children(Person person); - Builder children(Person.Builder person); - Builder colleague(Person person); - Builder colleague(Person.Builder person); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder deathDate(java.util.Date date); - Builder duns(String duns); - Builder email(String email); - Builder familyName(String familyName); - Builder faxNumber(String faxNumber); - Builder follows(Person person); - Builder follows(Person.Builder person); - Builder gender(String gender); - Builder givenName(String givenName); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder homeLocation(ContactPoint contactPoint); - Builder homeLocation(ContactPoint.Builder contactPoint); - Builder homeLocation(Place place); - Builder homeLocation(Place.Builder place); - Builder honorificPrefix(String honorificPrefix); - Builder honorificSuffix(String honorificSuffix); - Builder isicV4(String isicV4); - Builder jobTitle(String jobTitle); - Builder knows(Person person); - Builder knows(Person.Builder person); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder nationality(Country country); - Builder nationality(Country.Builder country); - Builder netWorth(PriceSpecification priceSpecification); - Builder netWorth(PriceSpecification.Builder priceSpecification); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder parent(Person person); - Builder parent(Person.Builder person); - Builder performerIn(Event event); - Builder performerIn(Event.Builder event); - Builder relatedTo(Person person); - Builder relatedTo(Person.Builder person); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder sibling(Person person); - Builder sibling(Person.Builder person); - Builder spouse(Person person); - Builder spouse(Person.Builder person); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder weight(QuantitativeValue quantitativeValue); - Builder weight(QuantitativeValue.Builder quantitativeValue); - Builder workLocation(ContactPoint contactPoint); - Builder workLocation(ContactPoint.Builder contactPoint); - Builder workLocation(Place place); - Builder workLocation(Place.Builder place); - Builder worksFor(Organization organization); - Builder worksFor(Organization.Builder organization); - Builder birthPlace(Place place); - Builder birthPlace(Place.Builder place); - Builder deathPlace(Place place); - Builder deathPlace(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalName(String additionalName); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder affiliation(Organization organization); + @NotNull Builder affiliation(Organization.Builder organization); + @NotNull Builder alumniOf(EducationalOrganization educationalOrganization); + @NotNull Builder alumniOf(EducationalOrganization.Builder educationalOrganization); + @NotNull Builder award(String award); + @NotNull Builder birthDate(java.util.Date date); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder children(Person person); + @NotNull Builder children(Person.Builder person); + @NotNull Builder colleague(Person person); + @NotNull Builder colleague(Person.Builder person); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder deathDate(java.util.Date date); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder familyName(String familyName); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder follows(Person person); + @NotNull Builder follows(Person.Builder person); + @NotNull Builder gender(String gender); + @NotNull Builder givenName(String givenName); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder homeLocation(ContactPoint contactPoint); + @NotNull Builder homeLocation(ContactPoint.Builder contactPoint); + @NotNull Builder homeLocation(Place place); + @NotNull Builder homeLocation(Place.Builder place); + @NotNull Builder honorificPrefix(String honorificPrefix); + @NotNull Builder honorificSuffix(String honorificSuffix); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder jobTitle(String jobTitle); + @NotNull Builder knows(Person person); + @NotNull Builder knows(Person.Builder person); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder nationality(Country country); + @NotNull Builder nationality(Country.Builder country); + @NotNull Builder netWorth(PriceSpecification priceSpecification); + @NotNull Builder netWorth(PriceSpecification.Builder priceSpecification); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder parent(Person person); + @NotNull Builder parent(Person.Builder person); + @NotNull Builder performerIn(Event event); + @NotNull Builder performerIn(Event.Builder event); + @NotNull Builder relatedTo(Person person); + @NotNull Builder relatedTo(Person.Builder person); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder sibling(Person person); + @NotNull Builder sibling(Person.Builder person); + @NotNull Builder spouse(Person person); + @NotNull Builder spouse(Person.Builder person); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder weight(QuantitativeValue quantitativeValue); + @NotNull Builder weight(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder workLocation(ContactPoint contactPoint); + @NotNull Builder workLocation(ContactPoint.Builder contactPoint); + @NotNull Builder workLocation(Place place); + @NotNull Builder workLocation(Place.Builder place); + @NotNull Builder worksFor(Organization organization); + @NotNull Builder worksFor(Organization.Builder organization); + @NotNull Builder birthPlace(Place place); + @NotNull Builder birthPlace(Place.Builder place); + @NotNull Builder deathPlace(Place place); + @NotNull Builder deathPlace(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Person(String additionalName, PostalAddress address, Organization affiliation, EducationalOrganization alumniOf, String award, java.util.Date birthDate, BrandOrOrganization brand, Person children, Person colleague, ContactPoint contactPoint, java.util.Date deathDate, String duns, String email, String familyName, String faxNumber, Person follows, String gender, String givenName, String globalLocationNumber, Place hasPOS, DistanceOrQuantitativeValue height, ContactPointOrPlace homeLocation, String honorificPrefix, String honorificSuffix, String isicV4, String jobTitle, Person knows, Offer makesOffer, OrganizationOrProgramMembership memberOf, String naics, Country nationality, PriceSpecification netWorth, OwnershipInfoOrProduct owns, Person parent, Event performerIn, Person relatedTo, Demand seeks, Person sibling, Person spouse, String taxID, String telephone, String vatID, QuantitativeValue weight, ContactPointOrPlace workLocation, Organization worksFor, Place birthPlace, Place deathPlace, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/PetStore.java b/src/main/java/org/schema/PetStore.java index 39f4a7ce..d13a072e 100644 --- a/src/main/java/org/schema/PetStore.java +++ b/src/main/java/org/schema/PetStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A pet store. */ @@ -25,7 +29,7 @@ public class PetStore extends Store { /** * Builder for {@link PetStore} */ - public static final class PetStoreThingBuilder implements Builder { + static final class PetStoreThingBuilder implements Builder { /** * Creates new {@link PetStore} instance. */ @@ -35,107 +39,107 @@ public PetStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Pharmacy.java b/src/main/java/org/schema/Pharmacy.java index e81251a7..b482052b 100644 --- a/src/main/java/org/schema/Pharmacy.java +++ b/src/main/java/org/schema/Pharmacy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A pharmacy or drugstore. */ @@ -25,7 +29,7 @@ public class Pharmacy extends MedicalOrganization { /** * Builder for {@link Pharmacy} */ - public static final class PharmacyThingBuilder implements Builder { + static final class PharmacyThingBuilder implements Builder { /** * Creates new {@link Pharmacy} instance. */ @@ -35,107 +39,107 @@ public Pharmacy build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PharmacySpecialty.java b/src/main/java/org/schema/PharmacySpecialty.java index 7f37bf0e..11b4db1b 100644 --- a/src/main/java/org/schema/PharmacySpecialty.java +++ b/src/main/java/org/schema/PharmacySpecialty.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Pharmacy. */ @@ -25,7 +29,7 @@ public class PharmacySpecialty { /** * Builder for {@link PharmacySpecialty} */ - public static final class PharmacySpecialtyThingBuilder implements Builder { + static final class PharmacySpecialtyThingBuilder implements Builder { /** * Creates new {@link PharmacySpecialty} instance. */ @@ -34,7 +38,7 @@ public PharmacySpecialty build() { } } public interface Builder extends ThingBuilder { - + } protected PharmacySpecialty() { diff --git a/src/main/java/org/schema/Photograph.java b/src/main/java/org/schema/Photograph.java index c89e0c63..4a5323a4 100644 --- a/src/main/java/org/schema/Photograph.java +++ b/src/main/java/org/schema/Photograph.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A photograph. */ @@ -25,7 +29,7 @@ public class Photograph extends CreativeWork { /** * Builder for {@link Photograph} */ - public static final class PhotographThingBuilder implements Builder { + static final class PhotographThingBuilder implements Builder { /** * Creates new {@link Photograph} instance. */ @@ -35,127 +39,127 @@ public Photograph build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/PhotographAction.java b/src/main/java/org/schema/PhotographAction.java index 4c552bc4..2fb8db4c 100644 --- a/src/main/java/org/schema/PhotographAction.java +++ b/src/main/java/org/schema/PhotographAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of capturing still images of objects using a camera. */ @@ -25,7 +29,7 @@ public class PhotographAction extends CreateAction { /** * Builder for {@link PhotographAction} */ - public static final class PhotographActionThingBuilder implements Builder { + static final class PhotographActionThingBuilder implements Builder { /** * Creates new {@link PhotographAction} instance. */ @@ -35,7 +39,7 @@ public PhotographAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PhysicalActivity.java b/src/main/java/org/schema/PhysicalActivity.java index 3b99c25b..c287d397 100644 --- a/src/main/java/org/schema/PhysicalActivity.java +++ b/src/main/java/org/schema/PhysicalActivity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any bodily activity that enhances or maintains physical fitness and overall health and wellness. Includes activity that is part of daily living and routine, structured exercise, and exercise prescribed as part of a medical treatment or recovery plan. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -50,7 +54,7 @@ public String getPathophysiology() { /** * Builder for {@link PhysicalActivity} */ - public static final class PhysicalActivityThingBuilder implements Builder { + static final class PhysicalActivityThingBuilder implements Builder { /** * Creates new {@link PhysicalActivity} instance. */ @@ -60,7 +64,7 @@ public PhysicalActivity build() { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setAnatomicalStructure(anatomicalStructure); return this; @@ -68,13 +72,13 @@ public Builder associatedAnatomy(AnatomicalStructure anatomicalStructure) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { return this.associatedAnatomy(anatomicalStructure.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { + @NotNull public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setAnatomicalSystem(anatomicalSystem); return this; @@ -82,13 +86,13 @@ public Builder associatedAnatomy(AnatomicalSystem anatomicalSystem) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { + @NotNull public Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { return this.associatedAnatomy(anatomicalSystem.build()); } /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { + @NotNull public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { if (this.associatedAnatomy == null) this.associatedAnatomy = new AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy(); this.associatedAnatomy.setSuperficialAnatomy(superficialAnatomy); return this; @@ -96,13 +100,13 @@ public Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy) { /** * The anatomy of the underlying organ system or structures associated with this entity. */ - public Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy) { + @NotNull public Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy) { return this.associatedAnatomy(superficialAnatomy.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -110,13 +114,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -124,7 +128,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -132,184 +136,184 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The characteristics of associated patients, such as age, gender, race etc. */ - public Builder epidemiology(String epidemiology) { + @NotNull public Builder epidemiology(String epidemiology) { this.epidemiology = epidemiology; return this; } /** * Changes in the normal mechanical, physical, and biochemical functions that are associated with this activity or condition. */ - public Builder pathophysiology(String pathophysiology) { + @NotNull public Builder pathophysiology(String pathophysiology) { this.pathophysiology = pathophysiology; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -483,53 +487,53 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedAnatomy(AnatomicalStructure anatomicalStructure); - Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); - Builder associatedAnatomy(AnatomicalSystem anatomicalSystem); - Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); - Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy); - Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder epidemiology(String epidemiology); - Builder pathophysiology(String pathophysiology); - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedAnatomy(AnatomicalStructure anatomicalStructure); + @NotNull Builder associatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder associatedAnatomy(AnatomicalSystem anatomicalSystem); + @NotNull Builder associatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); + @NotNull Builder associatedAnatomy(SuperficialAnatomy superficialAnatomy); + @NotNull Builder associatedAnatomy(SuperficialAnatomy.Builder superficialAnatomy); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder epidemiology(String epidemiology); + @NotNull Builder pathophysiology(String pathophysiology); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PhysicalActivity(AnatomicalStructureOrAnatomicalSystemOrSuperficialAnatomy associatedAnatomy, PhysicalActivityCategoryOrStringOrThing category, String epidemiology, String pathophysiology, 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) { diff --git a/src/main/java/org/schema/PhysicalActivityCategory.java b/src/main/java/org/schema/PhysicalActivityCategory.java index 0527cc3b..d2dff5c1 100644 --- a/src/main/java/org/schema/PhysicalActivityCategory.java +++ b/src/main/java/org/schema/PhysicalActivityCategory.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Categories of physical activity, organized by physiologic classification. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class PhysicalActivityCategory extends Enumeration { /** * Builder for {@link PhysicalActivityCategory} */ - public static final class PhysicalActivityCategoryThingBuilder implements Builder { + static final class PhysicalActivityCategoryThingBuilder implements Builder { /** * Creates new {@link PhysicalActivityCategory} instance. */ @@ -36,7 +40,7 @@ public PhysicalActivityCategory build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PhysicalActivityCategory(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/PhysicalActivityCategoryOrStringOrThing.java b/src/main/java/org/schema/PhysicalActivityCategoryOrStringOrThing.java index 7dddacd2..542fda41 100644 --- a/src/main/java/org/schema/PhysicalActivityCategoryOrStringOrThing.java +++ b/src/main/java/org/schema/PhysicalActivityCategoryOrStringOrThing.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class PhysicalActivityCategoryOrStringOrThing { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myPhysicalActivityCategory != null) return myPhysicalActivityCategory; if (myString != null) return myString; @@ -29,12 +32,12 @@ public Object getJsonLdValue() { } public void setPhysicalActivityCategory(PhysicalActivityCategory physicalActivityCategory) { clear(); myPhysicalActivityCategory = physicalActivityCategory; } public PhysicalActivityCategory getPhysicalActivityCategory() { return myPhysicalActivityCategory; } - private PhysicalActivityCategory myPhysicalActivityCategory; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } - private String myString; public void setThing(Thing thing) { clear(); myThing = thing; } public Thing getThing() { return myThing; } + private PhysicalActivityCategory myPhysicalActivityCategory; + private String myString; private Thing myThing; private void clear() { myPhysicalActivityCategory = null; diff --git a/src/main/java/org/schema/PhysicalExam.java b/src/main/java/org/schema/PhysicalExam.java index 69b6bc80..5a00adf6 100644 --- a/src/main/java/org/schema/PhysicalExam.java +++ b/src/main/java/org/schema/PhysicalExam.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A type of physical examination of a patient performed by a physician. Enumerated type. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class PhysicalExam extends Enumeration { /** * Builder for {@link PhysicalExam} */ - public static final class PhysicalExamThingBuilder implements Builder { + static final class PhysicalExamThingBuilder implements Builder { /** * Creates new {@link PhysicalExam} instance. */ @@ -36,7 +40,7 @@ public PhysicalExam build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -44,13 +48,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -58,27 +62,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -238,22 +242,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PhysicalExam(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/PhysicalTherapy.java b/src/main/java/org/schema/PhysicalTherapy.java index 4667097a..6434a068 100644 --- a/src/main/java/org/schema/PhysicalTherapy.java +++ b/src/main/java/org/schema/PhysicalTherapy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A process of progressive physical care and rehabilitation aimed at improving a health condition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class PhysicalTherapy extends MedicalTherapy { /** * Builder for {@link PhysicalTherapy} */ - public static final class PhysicalTherapyThingBuilder implements Builder { + static final class PhysicalTherapyThingBuilder implements Builder { /** * Creates new {@link PhysicalTherapy} instance. */ @@ -36,164 +40,164 @@ public PhysicalTherapy build() { /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -227,7 +231,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -303,38 +307,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -363,40 +367,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Physician.java b/src/main/java/org/schema/Physician.java index cc4ffacd..c49cd9cd 100644 --- a/src/main/java/org/schema/Physician.java +++ b/src/main/java/org/schema/Physician.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A doctor's office. */ @@ -43,7 +47,7 @@ public MedicalSpecialty getMedicalSpecialty() { /** * Builder for {@link Physician} */ - public static final class PhysicianThingBuilder implements Builder { + static final class PhysicianThingBuilder implements Builder { /** * Creates new {@link Physician} instance. */ @@ -53,7 +57,7 @@ public Physician build() { /** * A medical service available from this provider. */ - public Builder availableService(MedicalProcedure medicalProcedure) { + @NotNull public Builder availableService(MedicalProcedure medicalProcedure) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalProcedure(medicalProcedure); return this; @@ -61,13 +65,13 @@ public Builder availableService(MedicalProcedure medicalProcedure) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalProcedure.Builder medicalProcedure) { + @NotNull public Builder availableService(MedicalProcedure.Builder medicalProcedure) { return this.availableService(medicalProcedure.build()); } /** * A medical service available from this provider. */ - public Builder availableService(MedicalTest medicalTest) { + @NotNull public Builder availableService(MedicalTest medicalTest) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalTest(medicalTest); return this; @@ -75,13 +79,13 @@ public Builder availableService(MedicalTest medicalTest) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalTest.Builder medicalTest) { + @NotNull public Builder availableService(MedicalTest.Builder medicalTest) { return this.availableService(medicalTest.build()); } /** * A medical service available from this provider. */ - public Builder availableService(MedicalTherapy medicalTherapy) { + @NotNull public Builder availableService(MedicalTherapy medicalTherapy) { if (this.availableService == null) this.availableService = new MedicalProcedureOrMedicalTestOrMedicalTherapy(); this.availableService.setMedicalTherapy(medicalTherapy); return this; @@ -89,139 +93,139 @@ public Builder availableService(MedicalTherapy medicalTherapy) { /** * A medical service available from this provider. */ - public Builder availableService(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder availableService(MedicalTherapy.Builder medicalTherapy) { return this.availableService(medicalTherapy.build()); } /** * A hospital with which the physician or office is affiliated. */ - public Builder hospitalAffiliation(Hospital hospital) { + @NotNull public Builder hospitalAffiliation(Hospital hospital) { this.hospitalAffiliation = hospital; return this; } /** * A hospital with which the physician or office is affiliated. */ - public Builder hospitalAffiliation(Hospital.Builder hospital) { + @NotNull public Builder hospitalAffiliation(Hospital.Builder hospital) { return this.hospitalAffiliation(hospital.build()); } /** * A medical specialty of the provider. */ - public Builder medicalSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder medicalSpecialty(MedicalSpecialty medicalSpecialty) { this.medicalSpecialty = medicalSpecialty; return this; } /** * A medical specialty of the provider. */ - public Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.medicalSpecialty(medicalSpecialty.build()); } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -229,13 +233,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -243,27 +247,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -271,13 +275,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -285,7 +289,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -293,13 +297,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -307,20 +311,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -328,13 +332,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -342,26 +346,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -371,7 +375,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -381,27 +385,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -435,7 +439,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -470,7 +474,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -503,7 +507,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -511,38 +515,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -583,66 +587,66 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder availableService(MedicalProcedure medicalProcedure); - Builder availableService(MedicalProcedure.Builder medicalProcedure); - Builder availableService(MedicalTest medicalTest); - Builder availableService(MedicalTest.Builder medicalTest); - Builder availableService(MedicalTherapy medicalTherapy); - Builder availableService(MedicalTherapy.Builder medicalTherapy); - Builder hospitalAffiliation(Hospital hospital); - Builder hospitalAffiliation(Hospital.Builder hospital); - Builder medicalSpecialty(MedicalSpecialty medicalSpecialty); - Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder availableService(MedicalProcedure medicalProcedure); + @NotNull Builder availableService(MedicalProcedure.Builder medicalProcedure); + @NotNull Builder availableService(MedicalTest medicalTest); + @NotNull Builder availableService(MedicalTest.Builder medicalTest); + @NotNull Builder availableService(MedicalTherapy medicalTherapy); + @NotNull Builder availableService(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder hospitalAffiliation(Hospital hospital); + @NotNull Builder hospitalAffiliation(Hospital.Builder hospital); + @NotNull Builder medicalSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder medicalSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Physician(MedicalProcedureOrMedicalTestOrMedicalTherapy availableService, Hospital hospitalAffiliation, MedicalSpecialty medicalSpecialty, 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) { diff --git a/src/main/java/org/schema/Physiotherapy.java b/src/main/java/org/schema/Physiotherapy.java index 9c5541b8..3f0a46c1 100644 --- a/src/main/java/org/schema/Physiotherapy.java +++ b/src/main/java/org/schema/Physiotherapy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Physiotherapy. */ @@ -25,7 +29,7 @@ public class Physiotherapy { /** * Builder for {@link Physiotherapy} */ - public static final class PhysiotherapyThingBuilder implements Builder { + static final class PhysiotherapyThingBuilder implements Builder { /** * Creates new {@link Physiotherapy} instance. */ @@ -34,7 +38,7 @@ public Physiotherapy build() { } } public interface Builder extends ThingBuilder { - + } protected Physiotherapy() { diff --git a/src/main/java/org/schema/Place.java b/src/main/java/org/schema/Place.java index 36a1b9e8..5e3661db 100644 --- a/src/main/java/org/schema/Place.java +++ b/src/main/java/org/schema/Place.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Entities that have a somewhat fixed, physical extension. */ @@ -118,7 +122,7 @@ public PropertyValue getAdditionalProperty() { /** * Builder for {@link Place} */ - public static final class PlaceThingBuilder implements Builder { + static final class PlaceThingBuilder implements Builder { /** * Creates new {@link Place} instance. */ @@ -128,66 +132,66 @@ public Place build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -195,13 +199,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -209,27 +213,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -237,13 +241,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -251,7 +255,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -259,13 +263,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -273,20 +277,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -294,13 +298,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -308,26 +312,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -337,7 +341,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -347,27 +351,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -401,7 +405,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -436,7 +440,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -469,7 +473,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -477,38 +481,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -541,50 +545,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Place(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) { diff --git a/src/main/java/org/schema/PlaceOfWorship.java b/src/main/java/org/schema/PlaceOfWorship.java index d0ab18b1..c9783d97 100644 --- a/src/main/java/org/schema/PlaceOfWorship.java +++ b/src/main/java/org/schema/PlaceOfWorship.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Place of worship, such as a church, synagogue, or mosque. */ @@ -25,7 +29,7 @@ public class PlaceOfWorship extends CivicStructure { /** * Builder for {@link PlaceOfWorship} */ - public static final class PlaceOfWorshipThingBuilder implements Builder { + static final class PlaceOfWorshipThingBuilder implements Builder { /** * Creates new {@link PlaceOfWorship} instance. */ @@ -35,73 +39,73 @@ public PlaceOfWorship build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PlaceOrPostalAddressOrString.java b/src/main/java/org/schema/PlaceOrPostalAddressOrString.java index 44e0e94f..e3ace49c 100644 --- a/src/main/java/org/schema/PlaceOrPostalAddressOrString.java +++ b/src/main/java/org/schema/PlaceOrPostalAddressOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class PlaceOrPostalAddressOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myPlace != null) return myPlace; if (myPostalAddress != null) return myPostalAddress; @@ -29,12 +32,12 @@ public Object getJsonLdValue() { } public void setPlace(Place place) { clear(); myPlace = place; } public Place getPlace() { return myPlace; } - private Place myPlace; public void setPostalAddress(PostalAddress postalAddress) { clear(); myPostalAddress = postalAddress; } public PostalAddress getPostalAddress() { return myPostalAddress; } - private PostalAddress myPostalAddress; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private Place myPlace; + private PostalAddress myPostalAddress; private String myString; private void clear() { myPlace = null; diff --git a/src/main/java/org/schema/PlaceboControlledTrial.java b/src/main/java/org/schema/PlaceboControlledTrial.java index fb186e69..87676037 100644 --- a/src/main/java/org/schema/PlaceboControlledTrial.java +++ b/src/main/java/org/schema/PlaceboControlledTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A placebo-controlled trial design. */ @@ -25,7 +29,7 @@ public class PlaceboControlledTrial { /** * Builder for {@link PlaceboControlledTrial} */ - public static final class PlaceboControlledTrialThingBuilder implements Builder { + static final class PlaceboControlledTrialThingBuilder implements Builder { /** * Creates new {@link PlaceboControlledTrial} instance. */ @@ -34,7 +38,7 @@ public PlaceboControlledTrial build() { } } public interface Builder extends ThingBuilder { - + } protected PlaceboControlledTrial() { diff --git a/src/main/java/org/schema/PlanAction.java b/src/main/java/org/schema/PlanAction.java index 62bbc26f..5d18cb75 100644 --- a/src/main/java/org/schema/PlanAction.java +++ b/src/main/java/org/schema/PlanAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of planning the execution of an event/task/action/reservation/plan to a future date. */ @@ -25,14 +29,14 @@ public class PlanAction extends OrganizeAction { /** * The time the object is scheduled to. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getScheduledTime() { return myScheduledTime; } /** * Builder for {@link PlanAction} */ - public static final class PlanActionThingBuilder implements Builder { + static final class PlanActionThingBuilder implements Builder { /** * Creates new {@link PlanAction} instance. */ @@ -42,14 +46,14 @@ public PlanAction build() { /** * The time the object is scheduled to. */ - public Builder scheduledTime(java.util.Date date) { + @NotNull public Builder scheduledTime(java.util.Date date) { this.scheduledTime = date; return this; } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -57,13 +61,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -71,7 +75,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -79,7 +83,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -88,67 +92,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -182,7 +186,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -217,7 +221,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -250,7 +254,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -258,38 +262,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -314,31 +318,31 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder scheduledTime(java.util.Date date); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder scheduledTime(java.util.Date date); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PlanAction(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) { diff --git a/src/main/java/org/schema/PlasticSurgery.java b/src/main/java/org/schema/PlasticSurgery.java index dbed0c73..150fd048 100644 --- a/src/main/java/org/schema/PlasticSurgery.java +++ b/src/main/java/org/schema/PlasticSurgery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to therapeutic or cosmetic repair or re-formation of missing, injured or malformed tissues or body parts by manual and instrumental means. */ @@ -25,7 +29,7 @@ public class PlasticSurgery { /** * Builder for {@link PlasticSurgery} */ - public static final class PlasticSurgeryThingBuilder implements Builder { + static final class PlasticSurgeryThingBuilder implements Builder { /** * Creates new {@link PlasticSurgery} instance. */ @@ -34,7 +38,7 @@ public PlasticSurgery build() { } } public interface Builder extends ThingBuilder { - + } protected PlasticSurgery() { diff --git a/src/main/java/org/schema/PlayAction.java b/src/main/java/org/schema/PlayAction.java index 515c9f39..c34caa36 100644 --- a/src/main/java/org/schema/PlayAction.java +++ b/src/main/java/org/schema/PlayAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of playing/exercising/training/performing for enjoyment, leisure, recreation, Competition or exercise.

Related actions:

  • ListenAction: Unlike ListenAction (which is under ConsumeAction), PlayAction refers to performing for an audience or at an event, rather than consuming music.
  • WatchAction: Unlike WatchAction (which is under ConsumeAction), PlayAction refers to showing/displaying for an audience or at an event, rather than consuming visual content
. */ @@ -37,7 +41,7 @@ public Event getEvent() { /** * Builder for {@link PlayAction} */ - public static final class PlayActionThingBuilder implements Builder { + static final class PlayActionThingBuilder implements Builder { /** * Creates new {@link PlayAction} instance. */ @@ -47,33 +51,33 @@ public PlayAction build() { /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -81,13 +85,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -95,7 +99,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -103,7 +107,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -112,67 +116,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -206,7 +210,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -241,7 +245,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -274,7 +278,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -282,38 +286,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -339,34 +343,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder event(Event event); - Builder event(Event.Builder event); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PlayAction(Audience audience, Event event, 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) { diff --git a/src/main/java/org/schema/Playground.java b/src/main/java/org/schema/Playground.java index 926ffc00..76fa4587 100644 --- a/src/main/java/org/schema/Playground.java +++ b/src/main/java/org/schema/Playground.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A playground. */ @@ -25,7 +29,7 @@ public class Playground extends CivicStructure { /** * Builder for {@link Playground} */ - public static final class PlaygroundThingBuilder implements Builder { + static final class PlaygroundThingBuilder implements Builder { /** * Creates new {@link Playground} instance. */ @@ -35,73 +39,73 @@ public Playground build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Plumber.java b/src/main/java/org/schema/Plumber.java index d197e6d6..2e8582d0 100644 --- a/src/main/java/org/schema/Plumber.java +++ b/src/main/java/org/schema/Plumber.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A plumbing service. */ @@ -25,7 +29,7 @@ public class Plumber extends ProfessionalService { /** * Builder for {@link Plumber} */ - public static final class PlumberThingBuilder implements Builder { + static final class PlumberThingBuilder implements Builder { /** * Creates new {@link Plumber} instance. */ @@ -35,107 +39,107 @@ public Plumber build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Podiatric.java b/src/main/java/org/schema/Podiatric.java index 56d990f4..e87abbad 100644 --- a/src/main/java/org/schema/Podiatric.java +++ b/src/main/java/org/schema/Podiatric.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Podiatry. */ @@ -25,7 +29,7 @@ public class Podiatric { /** * Builder for {@link Podiatric} */ - public static final class PodiatricThingBuilder implements Builder { + static final class PodiatricThingBuilder implements Builder { /** * Creates new {@link Podiatric} instance. */ @@ -34,7 +38,7 @@ public Podiatric build() { } } public interface Builder extends ThingBuilder { - + } protected Podiatric() { diff --git a/src/main/java/org/schema/PoliceStation.java b/src/main/java/org/schema/PoliceStation.java index 07d2e83e..f2fee925 100644 --- a/src/main/java/org/schema/PoliceStation.java +++ b/src/main/java/org/schema/PoliceStation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A police station. */ @@ -25,7 +29,7 @@ public class PoliceStation extends EmergencyService { /** * Builder for {@link PoliceStation} */ - public static final class PoliceStationThingBuilder implements Builder { + static final class PoliceStationThingBuilder implements Builder { /** * Creates new {@link PoliceStation} instance. */ @@ -35,107 +39,107 @@ public PoliceStation build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Pond.java b/src/main/java/org/schema/Pond.java index 8c412c1b..dff120f9 100644 --- a/src/main/java/org/schema/Pond.java +++ b/src/main/java/org/schema/Pond.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A pond. */ @@ -25,7 +29,7 @@ public class Pond extends BodyOfWater { /** * Builder for {@link Pond} */ - public static final class PondThingBuilder implements Builder { + static final class PondThingBuilder implements Builder { /** * Creates new {@link Pond} instance. */ @@ -35,66 +39,66 @@ public Pond build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Position.java b/src/main/java/org/schema/Position.java index 9c9c2240..e5f0b1cc 100644 --- a/src/main/java/org/schema/Position.java +++ b/src/main/java/org/schema/Position.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** */ public interface Position { diff --git a/src/main/java/org/schema/PostOffice.java b/src/main/java/org/schema/PostOffice.java index 3b10ff71..f6c4d85b 100644 --- a/src/main/java/org/schema/PostOffice.java +++ b/src/main/java/org/schema/PostOffice.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A post office. */ @@ -25,7 +29,7 @@ public class PostOffice extends GovernmentOffice { /** * Builder for {@link PostOffice} */ - public static final class PostOfficeThingBuilder implements Builder { + static final class PostOfficeThingBuilder implements Builder { /** * Creates new {@link PostOffice} instance. */ @@ -35,107 +39,107 @@ public PostOffice build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PostalAddress.java b/src/main/java/org/schema/PostalAddress.java index 27624ad2..a8d175c4 100644 --- a/src/main/java/org/schema/PostalAddress.java +++ b/src/main/java/org/schema/PostalAddress.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The mailing address. */ @@ -61,7 +65,7 @@ public String getStreetAddress() { /** * Builder for {@link PostalAddress} */ - public static final class PostalAddressThingBuilder implements Builder { + static final class PostalAddressThingBuilder implements Builder { /** * Creates new {@link PostalAddress} instance. */ @@ -71,128 +75,128 @@ public PostalAddress build() { /** * The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder addressCountry(Country country) { + @NotNull public Builder addressCountry(Country country) { this.addressCountry = country; return this; } /** * The country. For example, USA. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder addressCountry(Country.Builder country) { + @NotNull public Builder addressCountry(Country.Builder country) { return this.addressCountry(country.build()); } /** * The locality. For example, Mountain View. */ - public Builder addressLocality(String addressLocality) { + @NotNull public Builder addressLocality(String addressLocality) { this.addressLocality = addressLocality; return this; } /** * The region. For example, CA. */ - public Builder addressRegion(String addressRegion) { + @NotNull public Builder addressRegion(String addressRegion) { this.addressRegion = addressRegion; return this; } /** * The postal code. For example, 94043. */ - public Builder postalCode(String postalCode) { + @NotNull public Builder postalCode(String postalCode) { this.postalCode = postalCode; return this; } /** * The post office box number for PO box addresses. */ - public Builder postOfficeBoxNumber(String postOfficeBoxNumber) { + @NotNull public Builder postOfficeBoxNumber(String postOfficeBoxNumber) { this.postOfficeBoxNumber = postOfficeBoxNumber; return this; } /** * The street address. For example, 1600 Amphitheatre Pkwy. */ - public Builder streetAddress(String streetAddress) { + @NotNull public Builder streetAddress(String streetAddress) { this.streetAddress = streetAddress; return this; } /** * The location served by this contact point (e.g., a phone number intended for Europeans vs. North Americans or only within the United States). */ - public Builder areaServed(AdministrativeArea administrativeArea) { + @NotNull public Builder areaServed(AdministrativeArea administrativeArea) { this.areaServed = administrativeArea; return this; } /** * The location served by this contact point (e.g., a phone number intended for Europeans vs. North Americans or only within the United States). */ - public Builder areaServed(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder areaServed(AdministrativeArea.Builder administrativeArea) { return this.areaServed(administrativeArea.build()); } /** * A language someone may use with the item. */ - public Builder availableLanguage(Language language) { + @NotNull public Builder availableLanguage(Language language) { this.availableLanguage = language; return this; } /** * A language someone may use with the item. */ - public Builder availableLanguage(Language.Builder language) { + @NotNull public Builder availableLanguage(Language.Builder language) { return this.availableLanguage(language.build()); } /** * An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers). */ - public Builder contactOption(ContactPointOption contactPointOption) { + @NotNull public Builder contactOption(ContactPointOption contactPointOption) { this.contactOption = contactPointOption; return this; } /** * An option available on this contact point (e.g. a toll-free number or support for hearing-impaired callers). */ - public Builder contactOption(ContactPointOption.Builder contactPointOption) { + @NotNull public Builder contactOption(ContactPointOption.Builder contactPointOption) { return this.contactOption(contactPointOption.build()); } /** * A person or organization can have different contact points, for different purposes. For example, a sales contact point, a PR contact point and so on. This property is used to specify the kind of contact point. */ - public Builder contactType(String contactType) { + @NotNull public Builder contactType(String contactType) { this.contactType = contactType; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The hours during which this contact point is available. */ - public Builder hoursAvailable(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder hoursAvailable(OpeningHoursSpecification openingHoursSpecification) { this.hoursAvailable = openingHoursSpecification; return this; } /** * The hours during which this contact point is available. */ - public Builder hoursAvailable(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder hoursAvailable(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.hoursAvailable(openingHoursSpecification.build()); } /** * The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones"). */ - public Builder productSupported(Product product) { + @NotNull public Builder productSupported(Product product) { if (this.productSupported == null) this.productSupported = new ProductOrString(); this.productSupported.setProduct(product); return this; @@ -200,13 +204,13 @@ public Builder productSupported(Product product) { /** * The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones"). */ - public Builder productSupported(Product.Builder product) { + @NotNull public Builder productSupported(Product.Builder product) { return this.productSupported(product.build()); } /** * The product or service this support contact point is related to (such as product support for a particular product line). This can be a specific product or product line (e.g. "iPhone") or a general category of products or services (e.g. "smartphones"). */ - public Builder productSupported(String productSupported) { + @NotNull public Builder productSupported(String productSupported) { if (this.productSupported == null) this.productSupported = new ProductOrString(); this.productSupported.setString(productSupported); return this; @@ -214,28 +218,28 @@ public Builder productSupported(String productSupported) { /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -269,7 +273,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -304,7 +308,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -337,7 +341,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -345,38 +349,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -409,40 +413,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder addressCountry(Country country); - Builder addressCountry(Country.Builder country); - Builder addressLocality(String addressLocality); - Builder addressRegion(String addressRegion); - Builder postalCode(String postalCode); - Builder postOfficeBoxNumber(String postOfficeBoxNumber); - Builder streetAddress(String streetAddress); - Builder areaServed(AdministrativeArea administrativeArea); - Builder areaServed(AdministrativeArea.Builder administrativeArea); - Builder availableLanguage(Language language); - Builder availableLanguage(Language.Builder language); - Builder contactOption(ContactPointOption contactPointOption); - Builder contactOption(ContactPointOption.Builder contactPointOption); - Builder contactType(String contactType); - Builder email(String email); - Builder faxNumber(String faxNumber); - Builder hoursAvailable(OpeningHoursSpecification openingHoursSpecification); - Builder hoursAvailable(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder productSupported(Product product); - Builder productSupported(Product.Builder product); - Builder productSupported(String productSupported); - Builder telephone(String telephone); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder addressCountry(Country country); + @NotNull Builder addressCountry(Country.Builder country); + @NotNull Builder addressLocality(String addressLocality); + @NotNull Builder addressRegion(String addressRegion); + @NotNull Builder postalCode(String postalCode); + @NotNull Builder postOfficeBoxNumber(String postOfficeBoxNumber); + @NotNull Builder streetAddress(String streetAddress); + @NotNull Builder areaServed(AdministrativeArea administrativeArea); + @NotNull Builder areaServed(AdministrativeArea.Builder administrativeArea); + @NotNull Builder availableLanguage(Language language); + @NotNull Builder availableLanguage(Language.Builder language); + @NotNull Builder contactOption(ContactPointOption contactPointOption); + @NotNull Builder contactOption(ContactPointOption.Builder contactPointOption); + @NotNull Builder contactType(String contactType); + @NotNull Builder email(String email); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder hoursAvailable(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder hoursAvailable(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder productSupported(Product product); + @NotNull Builder productSupported(Product.Builder product); + @NotNull Builder productSupported(String productSupported); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PostalAddress(Country addressCountry, String addressLocality, String addressRegion, String postalCode, String postOfficeBoxNumber, String streetAddress, AdministrativeArea areaServed, Language availableLanguage, ContactPointOption contactOption, String contactType, String email, String faxNumber, OpeningHoursSpecification hoursAvailable, ProductOrString productSupported, String telephone, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/PotentialActionStatus.java b/src/main/java/org/schema/PotentialActionStatus.java index fde2422a..2291feb7 100644 --- a/src/main/java/org/schema/PotentialActionStatus.java +++ b/src/main/java/org/schema/PotentialActionStatus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A description of an action that is supported. */ @@ -25,7 +29,7 @@ public class PotentialActionStatus { /** * Builder for {@link PotentialActionStatus} */ - public static final class PotentialActionStatusThingBuilder implements Builder { + static final class PotentialActionStatusThingBuilder implements Builder { /** * Creates new {@link PotentialActionStatus} instance. */ @@ -34,7 +38,7 @@ public PotentialActionStatus build() { } } public interface Builder extends ThingBuilder { - + } protected PotentialActionStatus() { diff --git a/src/main/java/org/schema/PreOrder.java b/src/main/java/org/schema/PreOrder.java index 759cdae3..d79cb11d 100644 --- a/src/main/java/org/schema/PreOrder.java +++ b/src/main/java/org/schema/PreOrder.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is available for pre-order. */ @@ -25,7 +29,7 @@ public class PreOrder { /** * Builder for {@link PreOrder} */ - public static final class PreOrderThingBuilder implements Builder { + static final class PreOrderThingBuilder implements Builder { /** * Creates new {@link PreOrder} instance. */ @@ -34,7 +38,7 @@ public PreOrder build() { } } public interface Builder extends ThingBuilder { - + } protected PreOrder() { diff --git a/src/main/java/org/schema/PrependAction.java b/src/main/java/org/schema/PrependAction.java index 96b86912..564f0b6d 100644 --- a/src/main/java/org/schema/PrependAction.java +++ b/src/main/java/org/schema/PrependAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of inserting at the beginning if an ordered collection. */ @@ -25,7 +29,7 @@ public class PrependAction extends InsertAction { /** * Builder for {@link PrependAction} */ - public static final class PrependActionThingBuilder implements Builder { + static final class PrependActionThingBuilder implements Builder { /** * Creates new {@link PrependAction} instance. */ @@ -35,33 +39,33 @@ public PrependAction build() { /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing thing) { + @NotNull public Builder targetCollection(Thing thing) { this.targetCollection = thing; return this; } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing.Builder thing) { + @NotNull public Builder targetCollection(Thing.Builder thing) { return this.targetCollection(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -69,13 +73,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -83,7 +87,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -91,7 +95,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -100,67 +104,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -194,7 +198,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -229,7 +233,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -270,38 +274,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -327,34 +331,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder targetCollection(Thing thing); - Builder targetCollection(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder targetCollection(Thing thing); + @NotNull Builder targetCollection(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Preschool.java b/src/main/java/org/schema/Preschool.java index 7c29917c..67918ef5 100644 --- a/src/main/java/org/schema/Preschool.java +++ b/src/main/java/org/schema/Preschool.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A preschool. */ @@ -25,7 +29,7 @@ public class Preschool extends EducationalOrganization { /** * Builder for {@link Preschool} */ - public static final class PreschoolThingBuilder implements Builder { + static final class PreschoolThingBuilder implements Builder { /** * Creates new {@link Preschool} instance. */ @@ -35,53 +39,53 @@ public Preschool build() { /** * Alumni of educational organization. */ - public Builder alumni(Person person) { + @NotNull public Builder alumni(Person person) { this.alumni = person; return this; } /** * Alumni of educational organization. */ - public Builder alumni(Person.Builder person) { + @NotNull public Builder alumni(Person.Builder person) { return this.alumni(person.build()); } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -89,13 +93,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -103,147 +107,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -251,13 +255,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -265,20 +269,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -286,13 +290,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -300,13 +304,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -314,13 +318,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -328,33 +332,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -362,13 +366,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -376,100 +380,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -503,7 +507,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -538,7 +542,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -571,7 +575,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -579,38 +583,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -661,80 +665,80 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder alumni(Person person); - Builder alumni(Person.Builder person); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder alumni(Person person); + @NotNull Builder alumni(Person.Builder person); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PrescriptionOnly.java b/src/main/java/org/schema/PrescriptionOnly.java index e52ca0f9..bac9d9d1 100644 --- a/src/main/java/org/schema/PrescriptionOnly.java +++ b/src/main/java/org/schema/PrescriptionOnly.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Available by prescription only. */ @@ -25,7 +29,7 @@ public class PrescriptionOnly { /** * Builder for {@link PrescriptionOnly} */ - public static final class PrescriptionOnlyThingBuilder implements Builder { + static final class PrescriptionOnlyThingBuilder implements Builder { /** * Creates new {@link PrescriptionOnly} instance. */ @@ -34,7 +38,7 @@ public PrescriptionOnly build() { } } public interface Builder extends ThingBuilder { - + } protected PrescriptionOnly() { diff --git a/src/main/java/org/schema/PreventionIndication.java b/src/main/java/org/schema/PreventionIndication.java index 2cba4b3e..d5f0b1d6 100644 --- a/src/main/java/org/schema/PreventionIndication.java +++ b/src/main/java/org/schema/PreventionIndication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An indication for preventing an underlying condition, symptom, etc. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class PreventionIndication extends MedicalIndication { /** * Builder for {@link PreventionIndication} */ - public static final class PreventionIndicationThingBuilder implements Builder { + static final class PreventionIndicationThingBuilder implements Builder { /** * Creates new {@link PreventionIndication} instance. */ @@ -36,99 +40,99 @@ public PreventionIndication build() { /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -162,7 +166,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -197,7 +201,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -230,7 +234,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -238,38 +242,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -293,30 +297,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PriceSpecification.java b/src/main/java/org/schema/PriceSpecification.java index 5f98ffb7..5f4d7143 100644 --- a/src/main/java/org/schema/PriceSpecification.java +++ b/src/main/java/org/schema/PriceSpecification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A structured value representing a monetary amount. Typically, only the subclasses of this type are used for markup. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -76,14 +80,14 @@ public NumberOrString getPrice() { /** * The date when the item becomes valid. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidFrom() { return myValidFrom; } /** * The end of the validity of offer, price specification, or opening hours data. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getValidThrough() { return myValidThrough; } @@ -102,7 +106,7 @@ public String getPriceCurrency() { /** * Builder for {@link PriceSpecification} */ - public static final class PriceSpecificationThingBuilder implements Builder { + static final class PriceSpecificationThingBuilder implements Builder { /** * Creates new {@link PriceSpecification} instance. */ @@ -112,41 +116,41 @@ public PriceSpecification build() { /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { this.eligibleQuantity = quantitativeValue; return this; } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { return this.eligibleQuantity(quantitativeValue.build()); } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { this.eligibleTransactionVolume = priceSpecification; return this; } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { return this.eligibleTransactionVolume(priceSpecification.build()); } /** * The highest price if the price is a range. */ - public Builder maxPrice(Integer integer) { + @NotNull public Builder maxPrice(int maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); - this.maxPrice.setInteger(integer); + this.maxPrice.setInt(maxPrice); return this; } /** * The highest price if the price is a range. */ - public Builder maxPrice(Long maxPrice) { + @NotNull public Builder maxPrice(long maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setLong(maxPrice); return this; @@ -154,7 +158,7 @@ public Builder maxPrice(Long maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(Float maxPrice) { + @NotNull public Builder maxPrice(float maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setFloat(maxPrice); return this; @@ -162,7 +166,7 @@ public Builder maxPrice(Float maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(Double maxPrice) { + @NotNull public Builder maxPrice(double maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setDouble(maxPrice); return this; @@ -170,7 +174,7 @@ public Builder maxPrice(Double maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(String maxPrice) { + @NotNull public Builder maxPrice(String maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setString(maxPrice); return this; @@ -178,15 +182,15 @@ public Builder maxPrice(String maxPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Integer integer) { + @NotNull public Builder minPrice(int minPrice) { if (this.minPrice == null) this.minPrice = new Number(); - this.minPrice.setInteger(integer); + this.minPrice.setInt(minPrice); return this; } /** * The lowest price if the price is a range. */ - public Builder minPrice(Long minPrice) { + @NotNull public Builder minPrice(long minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setLong(minPrice); return this; @@ -194,7 +198,7 @@ public Builder minPrice(Long minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Float minPrice) { + @NotNull public Builder minPrice(float minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setFloat(minPrice); return this; @@ -202,7 +206,7 @@ public Builder minPrice(Float minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Double minPrice) { + @NotNull public Builder minPrice(double minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setDouble(minPrice); return this; @@ -210,7 +214,7 @@ public Builder minPrice(Double minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(String minPrice) { + @NotNull public Builder minPrice(String minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setString(minPrice); return this; @@ -238,7 +242,7 @@ public Builder minPrice(String minPrice) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -266,7 +270,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -274,49 +278,49 @@ public Builder price(String price) { /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The end of the validity of offer, price specification, or opening hours data. */ - public Builder validThrough(java.util.Date date) { + @NotNull public Builder validThrough(java.util.Date date) { this.validThrough = date; return this; } /** * Specifies whether the applicable value-added tax (VAT) is included in the price specification or not. */ - public Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded) { + @NotNull public Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded) { this.valueAddedTaxIncluded = valueAddedTaxIncluded; return this; } /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -350,7 +354,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -385,7 +389,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -418,7 +422,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -426,38 +430,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,38 +488,38 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder eligibleQuantity(QuantitativeValue quantitativeValue); - Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); - Builder eligibleTransactionVolume(PriceSpecification priceSpecification); - Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); - Builder maxPrice(Integer integer); - Builder maxPrice(Long maxPrice); - Builder maxPrice(Float maxPrice); - Builder maxPrice(Double maxPrice); - Builder maxPrice(String maxPrice); - Builder minPrice(Integer integer); - Builder minPrice(Long minPrice); - Builder minPrice(Float minPrice); - Builder minPrice(Double minPrice); - Builder minPrice(String minPrice); - Builder price(Number number); - Builder price(String price); - Builder validFrom(java.util.Date date); - Builder validThrough(java.util.Date date); - Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded); - Builder priceCurrency(String priceCurrency); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder eligibleQuantity(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleTransactionVolume(PriceSpecification priceSpecification); + @NotNull Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); + @NotNull Builder maxPrice(int maxPrice); + @NotNull Builder maxPrice(long maxPrice); + @NotNull Builder maxPrice(float maxPrice); + @NotNull Builder maxPrice(double maxPrice); + @NotNull Builder maxPrice(String maxPrice); + @NotNull Builder minPrice(int minPrice); + @NotNull Builder minPrice(long minPrice); + @NotNull Builder minPrice(float minPrice); + @NotNull Builder minPrice(double minPrice); + @NotNull Builder minPrice(String minPrice); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validThrough(java.util.Date date); + @NotNull Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/PrimaryCare.java b/src/main/java/org/schema/PrimaryCare.java index 178c4bc2..b65203f0 100644 --- a/src/main/java/org/schema/PrimaryCare.java +++ b/src/main/java/org/schema/PrimaryCare.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Primary care. */ @@ -25,7 +29,7 @@ public class PrimaryCare { /** * Builder for {@link PrimaryCare} */ - public static final class PrimaryCareThingBuilder implements Builder { + static final class PrimaryCareThingBuilder implements Builder { /** * Creates new {@link PrimaryCare} instance. */ @@ -34,7 +38,7 @@ public PrimaryCare build() { } } public interface Builder extends ThingBuilder { - + } protected PrimaryCare() { diff --git a/src/main/java/org/schema/Prion.java b/src/main/java/org/schema/Prion.java index b851f645..e38a1a00 100644 --- a/src/main/java/org/schema/Prion.java +++ b/src/main/java/org/schema/Prion.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A prion is an infectious agent composed of protein in a misfolded form. */ @@ -25,7 +29,7 @@ public class Prion { /** * Builder for {@link Prion} */ - public static final class PrionThingBuilder implements Builder { + static final class PrionThingBuilder implements Builder { /** * Creates new {@link Prion} instance. */ @@ -34,7 +38,7 @@ public Prion build() { } } public interface Builder extends ThingBuilder { - + } protected Prion() { diff --git a/src/main/java/org/schema/Product.java b/src/main/java/org/schema/Product.java index c27c8f62..1dd9ca1b 100644 --- a/src/main/java/org/schema/Product.java +++ b/src/main/java/org/schema/Product.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any offered product or service. For example: a pair of shoes; a concert ticket; the rental of a car; a haircut; or an episode of a TV show streamed online. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsProperties @@ -164,7 +168,7 @@ public String getProductID() { /** * The release date of a product or product model. This can be used to distinguish the exact variant of a product. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getReleaseDate() { return myReleaseDate; } @@ -204,21 +208,21 @@ public PropertyValue getAdditionalProperty() { /** * The date of production of the item, e.g. vehicle. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getProductionDate() { return myProductionDate; } /** * The date the item e.g. vehicle was purchased by the current owner. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getPurchaseDate() { return myPurchaseDate; } /** * Builder for {@link Product} */ - public static final class ProductThingBuilder implements Builder { + static final class ProductThingBuilder implements Builder { /** * Creates new {@link Product} instance. */ @@ -228,40 +232,40 @@ public Product build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -269,13 +273,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -283,13 +287,13 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -297,13 +301,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -311,7 +315,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -319,20 +323,20 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The color of the product. */ - public Builder color(String color) { + @NotNull public Builder color(String color) { this.color = color; return this; } /** * The depth of the item. */ - public Builder depth(Distance distance) { + @NotNull public Builder depth(Distance distance) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setDistance(distance); return this; @@ -340,13 +344,13 @@ public Builder depth(Distance distance) { /** * The depth of the item. */ - public Builder depth(Distance.Builder distance) { + @NotNull public Builder depth(Distance.Builder distance) { return this.depth(distance.build()); } /** * The depth of the item. */ - public Builder depth(QuantitativeValue quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue quantitativeValue) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setQuantitativeValue(quantitativeValue); return this; @@ -354,41 +358,41 @@ public Builder depth(QuantitativeValue quantitativeValue) { /** * The depth of the item. */ - public Builder depth(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue.Builder quantitativeValue) { return this.depth(quantitativeValue.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -396,13 +400,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -410,78 +414,78 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product product) { this.isAccessoryOrSparePartFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product.Builder product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product.Builder product) { return this.isAccessoryOrSparePartFor(product.build()); } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product product) { + @NotNull public Builder isConsumableFor(Product product) { this.isConsumableFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product.Builder product) { + @NotNull public Builder isConsumableFor(Product.Builder product) { return this.isConsumableFor(product.build()); } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product product) { + @NotNull public Builder isRelatedTo(Product product) { this.isRelatedTo = product; return this; } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product.Builder product) { + @NotNull public Builder isRelatedTo(Product.Builder product) { return this.isRelatedTo(product.build()); } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product product) { + @NotNull public Builder isSimilarTo(Product product) { this.isSimilarTo = product; return this; } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product.Builder product) { + @NotNull public Builder isSimilarTo(Product.Builder product) { return this.isSimilarTo(product.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -489,13 +493,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -503,20 +507,20 @@ public Builder logo(String logo) { /** * The manufacturer of the product. */ - public Builder manufacturer(Organization organization) { + @NotNull public Builder manufacturer(Organization organization) { this.manufacturer = organization; return this; } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization.Builder organization) { + @NotNull public Builder manufacturer(Organization.Builder organization) { return this.manufacturer(organization.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel productModel) { + @NotNull public Builder model(ProductModel productModel) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setProductModel(productModel); return this; @@ -524,13 +528,13 @@ public Builder model(ProductModel productModel) { /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel.Builder productModel) { + @NotNull public Builder model(ProductModel.Builder productModel) { return this.model(productModel.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(String model) { + @NotNull public Builder model(String model) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setString(model); return this; @@ -538,74 +542,74 @@ public Builder model(String model) { /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The product identifier, such as ISBN. For example: <meta itemprop='productID' content='isbn:123-456-789'/>. */ - public Builder productID(String productID) { + @NotNull public Builder productID(String productID) { this.productID = productID; return this; } /** * The release date of a product or product model. This can be used to distinguish the exact variant of a product. */ - public Builder releaseDate(java.util.Date date) { + @NotNull public Builder releaseDate(java.util.Date date) { this.releaseDate = date; return this; } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue quantitativeValue) { this.weight = quantitativeValue; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue.Builder quantitativeValue) { return this.weight(quantitativeValue.build()); } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -613,13 +617,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -627,7 +631,7 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** @@ -636,7 +640,7 @@ public Builder width(QuantitativeValue.Builder quantitativeValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -646,41 +650,41 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * The date of production of the item, e.g. vehicle. */ - public Builder productionDate(java.util.Date date) { + @NotNull public Builder productionDate(java.util.Date date) { this.productionDate = date; return this; } /** * The date the item e.g. vehicle was purchased by the current owner. */ - public Builder purchaseDate(java.util.Date date) { + @NotNull public Builder purchaseDate(java.util.Date date) { this.purchaseDate = date; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -714,7 +718,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -749,7 +753,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -782,7 +786,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -790,38 +794,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -870,81 +874,81 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder color(String color); - Builder depth(Distance distance); - Builder depth(Distance.Builder distance); - Builder depth(QuantitativeValue quantitativeValue); - Builder depth(QuantitativeValue.Builder quantitativeValue); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder isAccessoryOrSparePartFor(Product product); - Builder isAccessoryOrSparePartFor(Product.Builder product); - Builder isConsumableFor(Product product); - Builder isConsumableFor(Product.Builder product); - Builder isRelatedTo(Product product); - Builder isRelatedTo(Product.Builder product); - Builder isSimilarTo(Product product); - Builder isSimilarTo(Product.Builder product); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder manufacturer(Organization organization); - Builder manufacturer(Organization.Builder organization); - Builder model(ProductModel productModel); - Builder model(ProductModel.Builder productModel); - Builder model(String model); - Builder mpn(String mpn); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder productID(String productID); - Builder releaseDate(java.util.Date date); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sku(String sku); - Builder weight(QuantitativeValue quantitativeValue); - Builder weight(QuantitativeValue.Builder quantitativeValue); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder productionDate(java.util.Date date); - Builder purchaseDate(java.util.Date date); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder color(String color); + @NotNull Builder depth(Distance distance); + @NotNull Builder depth(Distance.Builder distance); + @NotNull Builder depth(QuantitativeValue quantitativeValue); + @NotNull Builder depth(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder isAccessoryOrSparePartFor(Product product); + @NotNull Builder isAccessoryOrSparePartFor(Product.Builder product); + @NotNull Builder isConsumableFor(Product product); + @NotNull Builder isConsumableFor(Product.Builder product); + @NotNull Builder isRelatedTo(Product product); + @NotNull Builder isRelatedTo(Product.Builder product); + @NotNull Builder isSimilarTo(Product product); + @NotNull Builder isSimilarTo(Product.Builder product); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder manufacturer(Organization organization); + @NotNull Builder manufacturer(Organization.Builder organization); + @NotNull Builder model(ProductModel productModel); + @NotNull Builder model(ProductModel.Builder productModel); + @NotNull Builder model(String model); + @NotNull Builder mpn(String mpn); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder productID(String productID); + @NotNull Builder releaseDate(java.util.Date date); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sku(String sku); + @NotNull Builder weight(QuantitativeValue quantitativeValue); + @NotNull Builder weight(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder productionDate(java.util.Date date); + @NotNull Builder purchaseDate(java.util.Date date); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Product(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) { diff --git a/src/main/java/org/schema/ProductModel.java b/src/main/java/org/schema/ProductModel.java index 3145a0ab..f0e5f348 100644 --- a/src/main/java/org/schema/ProductModel.java +++ b/src/main/java/org/schema/ProductModel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A datasheet or vendor specification of a product (in the sense of a prototypical description). * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -44,7 +48,7 @@ public ProductModel getSuccessorOf() { /** * Builder for {@link ProductModel} */ - public static final class ProductModelThingBuilder implements Builder { + static final class ProductModelThingBuilder implements Builder { /** * Creates new {@link ProductModel} instance. */ @@ -54,79 +58,79 @@ public ProductModel build() { /** * A pointer to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. */ - public Builder isVariantOf(ProductModel productModel) { + @NotNull public Builder isVariantOf(ProductModel productModel) { this.isVariantOf = productModel; return this; } /** * A pointer to a base product from which this product is a variant. It is safe to infer that the variant inherits all product features from the base model, unless defined locally. This is not transitive. */ - public Builder isVariantOf(ProductModel.Builder productModel) { + @NotNull public Builder isVariantOf(ProductModel.Builder productModel) { return this.isVariantOf(productModel.build()); } /** * A pointer from a previous, often discontinued variant of the product to its newer variant. */ - public Builder predecessorOf(ProductModel productModel) { + @NotNull public Builder predecessorOf(ProductModel productModel) { this.predecessorOf = productModel; return this; } /** * A pointer from a previous, often discontinued variant of the product to its newer variant. */ - public Builder predecessorOf(ProductModel.Builder productModel) { + @NotNull public Builder predecessorOf(ProductModel.Builder productModel) { return this.predecessorOf(productModel.build()); } /** * A pointer from a newer variant of a product to its previous, often discontinued predecessor. */ - public Builder successorOf(ProductModel productModel) { + @NotNull public Builder successorOf(ProductModel productModel) { this.successorOf = productModel; return this; } /** * A pointer from a newer variant of a product to its previous, often discontinued predecessor. */ - public Builder successorOf(ProductModel.Builder productModel) { + @NotNull public Builder successorOf(ProductModel.Builder productModel) { return this.successorOf(productModel.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -134,13 +138,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -148,13 +152,13 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -162,13 +166,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -176,7 +180,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -184,20 +188,20 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The color of the product. */ - public Builder color(String color) { + @NotNull public Builder color(String color) { this.color = color; return this; } /** * The depth of the item. */ - public Builder depth(Distance distance) { + @NotNull public Builder depth(Distance distance) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setDistance(distance); return this; @@ -205,13 +209,13 @@ public Builder depth(Distance distance) { /** * The depth of the item. */ - public Builder depth(Distance.Builder distance) { + @NotNull public Builder depth(Distance.Builder distance) { return this.depth(distance.build()); } /** * The depth of the item. */ - public Builder depth(QuantitativeValue quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue quantitativeValue) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setQuantitativeValue(quantitativeValue); return this; @@ -219,41 +223,41 @@ public Builder depth(QuantitativeValue quantitativeValue) { /** * The depth of the item. */ - public Builder depth(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue.Builder quantitativeValue) { return this.depth(quantitativeValue.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -261,13 +265,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -275,78 +279,78 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product product) { this.isAccessoryOrSparePartFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product.Builder product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product.Builder product) { return this.isAccessoryOrSparePartFor(product.build()); } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product product) { + @NotNull public Builder isConsumableFor(Product product) { this.isConsumableFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product.Builder product) { + @NotNull public Builder isConsumableFor(Product.Builder product) { return this.isConsumableFor(product.build()); } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product product) { + @NotNull public Builder isRelatedTo(Product product) { this.isRelatedTo = product; return this; } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product.Builder product) { + @NotNull public Builder isRelatedTo(Product.Builder product) { return this.isRelatedTo(product.build()); } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product product) { + @NotNull public Builder isSimilarTo(Product product) { this.isSimilarTo = product; return this; } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product.Builder product) { + @NotNull public Builder isSimilarTo(Product.Builder product) { return this.isSimilarTo(product.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -354,13 +358,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -368,20 +372,20 @@ public Builder logo(String logo) { /** * The manufacturer of the product. */ - public Builder manufacturer(Organization organization) { + @NotNull public Builder manufacturer(Organization organization) { this.manufacturer = organization; return this; } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization.Builder organization) { + @NotNull public Builder manufacturer(Organization.Builder organization) { return this.manufacturer(organization.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel productModel) { + @NotNull public Builder model(ProductModel productModel) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setProductModel(productModel); return this; @@ -389,13 +393,13 @@ public Builder model(ProductModel productModel) { /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel.Builder productModel) { + @NotNull public Builder model(ProductModel.Builder productModel) { return this.model(productModel.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(String model) { + @NotNull public Builder model(String model) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setString(model); return this; @@ -403,74 +407,74 @@ public Builder model(String model) { /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The product identifier, such as ISBN. For example: <meta itemprop='productID' content='isbn:123-456-789'/>. */ - public Builder productID(String productID) { + @NotNull public Builder productID(String productID) { this.productID = productID; return this; } /** * The release date of a product or product model. This can be used to distinguish the exact variant of a product. */ - public Builder releaseDate(java.util.Date date) { + @NotNull public Builder releaseDate(java.util.Date date) { this.releaseDate = date; return this; } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue quantitativeValue) { this.weight = quantitativeValue; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue.Builder quantitativeValue) { return this.weight(quantitativeValue.build()); } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -478,13 +482,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -492,7 +496,7 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** @@ -501,7 +505,7 @@ public Builder width(QuantitativeValue.Builder quantitativeValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -511,41 +515,41 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * The date of production of the item, e.g. vehicle. */ - public Builder productionDate(java.util.Date date) { + @NotNull public Builder productionDate(java.util.Date date) { this.productionDate = date; return this; } /** * The date the item e.g. vehicle was purchased by the current owner. */ - public Builder purchaseDate(java.util.Date date) { + @NotNull public Builder purchaseDate(java.util.Date date) { this.purchaseDate = date; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -579,7 +583,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -614,7 +618,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -647,7 +651,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -655,38 +659,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -738,87 +742,87 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder isVariantOf(ProductModel productModel); - Builder isVariantOf(ProductModel.Builder productModel); - Builder predecessorOf(ProductModel productModel); - Builder predecessorOf(ProductModel.Builder productModel); - Builder successorOf(ProductModel productModel); - Builder successorOf(ProductModel.Builder productModel); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder color(String color); - Builder depth(Distance distance); - Builder depth(Distance.Builder distance); - Builder depth(QuantitativeValue quantitativeValue); - Builder depth(QuantitativeValue.Builder quantitativeValue); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder isAccessoryOrSparePartFor(Product product); - Builder isAccessoryOrSparePartFor(Product.Builder product); - Builder isConsumableFor(Product product); - Builder isConsumableFor(Product.Builder product); - Builder isRelatedTo(Product product); - Builder isRelatedTo(Product.Builder product); - Builder isSimilarTo(Product product); - Builder isSimilarTo(Product.Builder product); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder manufacturer(Organization organization); - Builder manufacturer(Organization.Builder organization); - Builder model(ProductModel productModel); - Builder model(ProductModel.Builder productModel); - Builder model(String model); - Builder mpn(String mpn); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder productID(String productID); - Builder releaseDate(java.util.Date date); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sku(String sku); - Builder weight(QuantitativeValue quantitativeValue); - Builder weight(QuantitativeValue.Builder quantitativeValue); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder productionDate(java.util.Date date); - Builder purchaseDate(java.util.Date date); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder isVariantOf(ProductModel productModel); + @NotNull Builder isVariantOf(ProductModel.Builder productModel); + @NotNull Builder predecessorOf(ProductModel productModel); + @NotNull Builder predecessorOf(ProductModel.Builder productModel); + @NotNull Builder successorOf(ProductModel productModel); + @NotNull Builder successorOf(ProductModel.Builder productModel); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder color(String color); + @NotNull Builder depth(Distance distance); + @NotNull Builder depth(Distance.Builder distance); + @NotNull Builder depth(QuantitativeValue quantitativeValue); + @NotNull Builder depth(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder isAccessoryOrSparePartFor(Product product); + @NotNull Builder isAccessoryOrSparePartFor(Product.Builder product); + @NotNull Builder isConsumableFor(Product product); + @NotNull Builder isConsumableFor(Product.Builder product); + @NotNull Builder isRelatedTo(Product product); + @NotNull Builder isRelatedTo(Product.Builder product); + @NotNull Builder isSimilarTo(Product product); + @NotNull Builder isSimilarTo(Product.Builder product); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder manufacturer(Organization organization); + @NotNull Builder manufacturer(Organization.Builder organization); + @NotNull Builder model(ProductModel productModel); + @NotNull Builder model(ProductModel.Builder productModel); + @NotNull Builder model(String model); + @NotNull Builder mpn(String mpn); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder productID(String productID); + @NotNull Builder releaseDate(java.util.Date date); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sku(String sku); + @NotNull Builder weight(QuantitativeValue quantitativeValue); + @NotNull Builder weight(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder productionDate(java.util.Date date); + @NotNull Builder purchaseDate(java.util.Date date); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ProductModel(ProductModel isVariantOf, ProductModel predecessorOf, ProductModel successorOf, 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) { diff --git a/src/main/java/org/schema/ProductModelOrString.java b/src/main/java/org/schema/ProductModelOrString.java index ec346787..9af95e03 100644 --- a/src/main/java/org/schema/ProductModelOrString.java +++ b/src/main/java/org/schema/ProductModelOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ProductModelOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myProductModel != null) return myProductModel; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setProductModel(ProductModel productModel) { clear(); myProductModel = productModel; } public ProductModel getProductModel() { return myProductModel; } - private ProductModel myProductModel; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private ProductModel myProductModel; private String myString; private void clear() { myProductModel = null; diff --git a/src/main/java/org/schema/ProductOrString.java b/src/main/java/org/schema/ProductOrString.java index d92bd509..c8778edb 100644 --- a/src/main/java/org/schema/ProductOrString.java +++ b/src/main/java/org/schema/ProductOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class ProductOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myProduct != null) return myProduct; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setProduct(Product product) { clear(); myProduct = product; } public Product getProduct() { return myProduct; } - private Product myProduct; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private Product myProduct; private String myString; private void clear() { myProduct = null; diff --git a/src/main/java/org/schema/ProfessionalService.java b/src/main/java/org/schema/ProfessionalService.java index b8f3e4f5..68feb713 100644 --- a/src/main/java/org/schema/ProfessionalService.java +++ b/src/main/java/org/schema/ProfessionalService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Provider of professional services. */ @@ -25,7 +29,7 @@ public class ProfessionalService extends LocalBusiness { /** * Builder for {@link ProfessionalService} */ - public static final class ProfessionalServiceThingBuilder implements Builder { + static final class ProfessionalServiceThingBuilder implements Builder { /** * Creates new {@link ProfessionalService} instance. */ @@ -35,107 +39,107 @@ public ProfessionalService build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ProfilePage.java b/src/main/java/org/schema/ProfilePage.java index 16fdc288..963db8db 100644 --- a/src/main/java/org/schema/ProfilePage.java +++ b/src/main/java/org/schema/ProfilePage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web page type: Profile page. */ @@ -25,7 +29,7 @@ public class ProfilePage extends WebPage { /** * Builder for {@link ProfilePage} */ - public static final class ProfilePageThingBuilder implements Builder { + static final class ProfilePageThingBuilder implements Builder { /** * Creates new {@link ProfilePage} instance. */ @@ -35,7 +39,7 @@ public ProfilePage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/ProgramMembership.java b/src/main/java/org/schema/ProgramMembership.java index 3063ac1b..43174def 100644 --- a/src/main/java/org/schema/ProgramMembership.java +++ b/src/main/java/org/schema/ProgramMembership.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Used to describe membership in a loyalty programs (e.g. "StarAliance"), traveler clubs (e.g. "AAA"), purchase clubs ("Safeway Club"), etc. */ @@ -43,7 +47,7 @@ public Organization getHostingOrganization() { /** * Builder for {@link ProgramMembership} */ - public static final class ProgramMembershipThingBuilder implements Builder { + static final class ProgramMembershipThingBuilder implements Builder { /** * Creates new {@link ProgramMembership} instance. */ @@ -53,48 +57,48 @@ public ProgramMembership build() { /** * A unique identifier for the membership. */ - public Builder membershipNumber(String membershipNumber) { + @NotNull public Builder membershipNumber(String membershipNumber) { this.membershipNumber = membershipNumber; return this; } /** * The program providing the membership. */ - public Builder programName(String programName) { + @NotNull public Builder programName(String programName) { this.programName = programName; return this; } /** * The organization (airline, travelers' club, etc.) the membership is made with. */ - public Builder hostingOrganization(Organization organization) { + @NotNull public Builder hostingOrganization(Organization organization) { this.hostingOrganization = organization; return this; } /** * The organization (airline, travelers' club, etc.) the membership is made with. */ - public Builder hostingOrganization(Organization.Builder organization) { + @NotNull public Builder hostingOrganization(Organization.Builder organization) { return this.hostingOrganization(organization.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -128,7 +132,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -163,7 +167,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -196,7 +200,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -204,38 +208,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -256,22 +260,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder membershipNumber(String membershipNumber); - Builder programName(String programName); - Builder hostingOrganization(Organization organization); - Builder hostingOrganization(Organization.Builder organization); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder membershipNumber(String membershipNumber); + @NotNull Builder programName(String programName); + @NotNull Builder hostingOrganization(Organization organization); + @NotNull Builder hostingOrganization(Organization.Builder organization); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ProgramMembership(String membershipNumber, String programName, Organization hostingOrganization, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Project.java b/src/main/java/org/schema/Project.java index 30aaa679..433f0283 100644 --- a/src/main/java/org/schema/Project.java +++ b/src/main/java/org/schema/Project.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Project */ @@ -25,7 +29,7 @@ public class Project extends Thing { /** * Builder for {@link Project} */ - public static final class ProjectThingBuilder implements Builder { + static final class ProjectThingBuilder implements Builder { /** * Creates new {@link Project} instance. */ @@ -35,21 +39,21 @@ public Project build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Project(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Property.java b/src/main/java/org/schema/Property.java index c626e4c2..14fe4e88 100644 --- a/src/main/java/org/schema/Property.java +++ b/src/main/java/org/schema/Property.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A property, used to indicate attributes and relationships of some Thing; equivalent to rdf:Property. */ @@ -37,7 +41,7 @@ public EnumerationOrProperty getSupersededBy() { /** * Builder for {@link Property} */ - public static final class PropertyThingBuilder implements Builder { + static final class PropertyThingBuilder implements Builder { /** * Creates new {@link Property} instance. */ @@ -47,20 +51,20 @@ public Property build() { /** * Relates a property to a property that is its inverse. Inverse properties relate the same pairs of items to each other, but in reversed direction. For example, the 'alumni' and 'alumniOf' properties are inverseOf each other. Some properties don't have explicit inverses; in these situations RDFa and JSON-LD syntax for reverse properties can be used. */ - public Builder inverseOf(Property property) { + @NotNull public Builder inverseOf(Property property) { this.inverseOf = property; return this; } /** * Relates a property to a property that is its inverse. Inverse properties relate the same pairs of items to each other, but in reversed direction. For example, the 'alumni' and 'alumniOf' properties are inverseOf each other. Some properties don't have explicit inverses; in these situations RDFa and JSON-LD syntax for reverse properties can be used. */ - public Builder inverseOf(Property.Builder property) { + @NotNull public Builder inverseOf(Property.Builder property) { return this.inverseOf(property.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -68,13 +72,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -82,27 +86,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -136,7 +140,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -171,7 +175,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -204,7 +208,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -212,38 +216,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -263,24 +267,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder inverseOf(Property property); - Builder inverseOf(Property.Builder property); - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder inverseOf(Property property); + @NotNull Builder inverseOf(Property.Builder property); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Property(Property inverseOf, EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/PropertyValue.java b/src/main/java/org/schema/PropertyValue.java index cff73ce2..183aa283 100644 --- a/src/main/java/org/schema/PropertyValue.java +++ b/src/main/java/org/schema/PropertyValue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A property-value pair, e.g. representing a feature of a product or place. Use the 'name' property for the name of the property. If there is an additional human-readable version of the value, put that into the 'description' property. *

@@ -69,7 +73,7 @@ public String getPropertyID() { /** * Builder for {@link PropertyValue} */ - public static final class PropertyValueThingBuilder implements Builder { + static final class PropertyValueThingBuilder implements Builder { /** * Creates new {@link PropertyValue} instance. */ @@ -79,15 +83,15 @@ public PropertyValue build() { /** * The lower value of some characteristic or property. */ - public Builder minValue(Integer integer) { + @NotNull public Builder minValue(int minValue) { if (this.minValue == null) this.minValue = new Number(); - this.minValue.setInteger(integer); + this.minValue.setInt(minValue); return this; } /** * The lower value of some characteristic or property. */ - public Builder minValue(Long minValue) { + @NotNull public Builder minValue(long minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setLong(minValue); return this; @@ -95,7 +99,7 @@ public Builder minValue(Long minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(Float minValue) { + @NotNull public Builder minValue(float minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setFloat(minValue); return this; @@ -103,7 +107,7 @@ public Builder minValue(Float minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(Double minValue) { + @NotNull public Builder minValue(double minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setDouble(minValue); return this; @@ -111,7 +115,7 @@ public Builder minValue(Double minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(String minValue) { + @NotNull public Builder minValue(String minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setString(minValue); return this; @@ -119,14 +123,14 @@ public Builder minValue(String minValue) { /** * The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon. */ - public Builder unitCode(String unitCode) { + @NotNull public Builder unitCode(String unitCode) { this.unitCode = unitCode; 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'. */ - public Builder value(Boolean value) { + @NotNull public Builder value(Boolean value) { if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); this.value.setBoolean(value); return this; @@ -134,7 +138,7 @@ public Builder value(Boolean value) { /** * 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 Builder value(Number number) { + @NotNull public Builder value(Number number) { if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); this.value.setNumber(number); return this; @@ -142,7 +146,7 @@ public Builder value(Number number) { /** * 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 Builder value(String value) { + @NotNull public Builder value(String value) { if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); this.value.setString(value); return this; @@ -150,7 +154,7 @@ public Builder value(String value) { /** * 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 Builder value(StructuredValue structuredValue) { + @NotNull public Builder value(StructuredValue structuredValue) { if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); this.value.setStructuredValue(structuredValue); return this; @@ -158,13 +162,13 @@ public Builder value(StructuredValue structuredValue) { /** * 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 Builder value(StructuredValue.Builder structuredValue) { + @NotNull public Builder value(StructuredValue.Builder structuredValue) { return this.value(structuredValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration enumeration) { + @NotNull public Builder valueReference(Enumeration enumeration) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setEnumeration(enumeration); return this; @@ -172,13 +176,13 @@ public Builder valueReference(Enumeration enumeration) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration.Builder enumeration) { + @NotNull public Builder valueReference(Enumeration.Builder enumeration) { return this.valueReference(enumeration.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue propertyValue) { + @NotNull public Builder valueReference(PropertyValue propertyValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setPropertyValue(propertyValue); return this; @@ -186,13 +190,13 @@ public Builder valueReference(PropertyValue propertyValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue.Builder propertyValue) { + @NotNull public Builder valueReference(PropertyValue.Builder propertyValue) { return this.valueReference(propertyValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue qualitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQualitativeValue(qualitativeValue); return this; @@ -200,13 +204,13 @@ public Builder valueReference(QualitativeValue qualitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue.Builder qualitativeValue) { return this.valueReference(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue quantitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQuantitativeValue(quantitativeValue); return this; @@ -214,13 +218,13 @@ public Builder valueReference(QuantitativeValue quantitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { return this.valueReference(quantitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue structuredValue) { + @NotNull public Builder valueReference(StructuredValue structuredValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setStructuredValue(structuredValue); return this; @@ -228,14 +232,14 @@ public Builder valueReference(StructuredValue structuredValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue.Builder structuredValue) { + @NotNull public Builder valueReference(StructuredValue.Builder structuredValue) { return this.valueReference(structuredValue.build()); } /** * A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode. */ - public Builder unitText(String unitText) { + @NotNull public Builder unitText(String unitText) { this.unitText = unitText; return this; } @@ -245,28 +249,28 @@ public Builder unitText(String unitText) { a URL indicating the type of the property, either pointing to an external vocabulary, or a Web resource that describes the property (e.g. a glossary entry). Standards bodies should promote a standard prefix for the identifiers of properties from their standards. */ - public Builder propertyID(String propertyID) { + @NotNull public Builder propertyID(String propertyID) { this.propertyID = propertyID; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -300,7 +304,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -335,7 +339,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -368,7 +372,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -376,38 +380,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -431,41 +435,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder minValue(Integer integer); - Builder minValue(Long minValue); - Builder minValue(Float minValue); - Builder minValue(Double minValue); - Builder minValue(String minValue); - Builder unitCode(String unitCode); - Builder value(Boolean value); - Builder value(Number number); - Builder value(String value); - Builder value(StructuredValue structuredValue); - Builder value(StructuredValue.Builder structuredValue); - Builder valueReference(Enumeration enumeration); - Builder valueReference(Enumeration.Builder enumeration); - Builder valueReference(PropertyValue propertyValue); - Builder valueReference(PropertyValue.Builder propertyValue); - Builder valueReference(QualitativeValue qualitativeValue); - Builder valueReference(QualitativeValue.Builder qualitativeValue); - Builder valueReference(QuantitativeValue quantitativeValue); - Builder valueReference(QuantitativeValue.Builder quantitativeValue); - Builder valueReference(StructuredValue structuredValue); - Builder valueReference(StructuredValue.Builder structuredValue); - Builder unitText(String unitText); - Builder propertyID(String propertyID); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder minValue(int minValue); + @NotNull Builder minValue(long minValue); + @NotNull Builder minValue(float minValue); + @NotNull Builder minValue(double minValue); + @NotNull Builder minValue(String minValue); + @NotNull Builder unitCode(String unitCode); + @NotNull Builder value(Boolean value); + @NotNull Builder value(Number number); + @NotNull Builder value(String value); + @NotNull Builder value(StructuredValue structuredValue); + @NotNull Builder value(StructuredValue.Builder structuredValue); + @NotNull Builder valueReference(Enumeration enumeration); + @NotNull Builder valueReference(Enumeration.Builder enumeration); + @NotNull Builder valueReference(PropertyValue propertyValue); + @NotNull Builder valueReference(PropertyValue.Builder propertyValue); + @NotNull Builder valueReference(QualitativeValue qualitativeValue); + @NotNull Builder valueReference(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(QuantitativeValue quantitativeValue); + @NotNull Builder valueReference(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder valueReference(StructuredValue structuredValue); + @NotNull Builder valueReference(StructuredValue.Builder structuredValue); + @NotNull Builder unitText(String unitText); + @NotNull Builder propertyID(String propertyID); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/PropertyValueOrString.java b/src/main/java/org/schema/PropertyValueOrString.java index dd35d4b2..be8d3261 100644 --- a/src/main/java/org/schema/PropertyValueOrString.java +++ b/src/main/java/org/schema/PropertyValueOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class PropertyValueOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myPropertyValue != null) return myPropertyValue; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setPropertyValue(PropertyValue propertyValue) { clear(); myPropertyValue = propertyValue; } public PropertyValue getPropertyValue() { return myPropertyValue; } - private PropertyValue myPropertyValue; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private PropertyValue myPropertyValue; private String myString; private void clear() { myPropertyValue = null; diff --git a/src/main/java/org/schema/PropertyValueSpecification.java b/src/main/java/org/schema/PropertyValueSpecification.java index c0487341..518b8c05 100644 --- a/src/main/java/org/schema/PropertyValueSpecification.java +++ b/src/main/java/org/schema/PropertyValueSpecification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A Property value specification. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_ActionCollabClass @@ -86,7 +90,7 @@ public Number getStepValue() { /** * Builder for {@link PropertyValueSpecification} */ - public static final class PropertyValueSpecificationThingBuilder implements Builder { + static final class PropertyValueSpecificationThingBuilder implements Builder { /** * Creates new {@link PropertyValueSpecification} instance. */ @@ -96,15 +100,15 @@ public PropertyValueSpecification build() { /** * The lower value of some characteristic or property. */ - public Builder minValue(Integer integer) { + @NotNull public Builder minValue(int minValue) { if (this.minValue == null) this.minValue = new Number(); - this.minValue.setInteger(integer); + this.minValue.setInt(minValue); return this; } /** * The lower value of some characteristic or property. */ - public Builder minValue(Long minValue) { + @NotNull public Builder minValue(long minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setLong(minValue); return this; @@ -112,7 +116,7 @@ public Builder minValue(Long minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(Float minValue) { + @NotNull public Builder minValue(float minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setFloat(minValue); return this; @@ -120,7 +124,7 @@ public Builder minValue(Float minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(Double minValue) { + @NotNull public Builder minValue(double minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setDouble(minValue); return this; @@ -128,7 +132,7 @@ public Builder minValue(Double minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(String minValue) { + @NotNull public Builder minValue(String minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setString(minValue); return this; @@ -136,21 +140,21 @@ public Builder minValue(String minValue) { /** * Indicates the name of the PropertyValueSpecification to be used in URL templates and form encoding in a manner analogous to HTML's input@name. */ - public Builder valueName(String valueName) { + @NotNull public Builder valueName(String valueName) { this.valueName = valueName; return this; } /** * Whether the property must be filled in to complete the action. Default is false. */ - public Builder valueRequired(Boolean valueRequired) { + @NotNull public Builder valueRequired(Boolean valueRequired) { this.valueRequired = valueRequired; return this; } /** * The default value of the input. For properties that expect a literal, the default is a literal value, for properties that expect an object, it's an ID reference to one of the current values. */ - public Builder defaultValue(String defaultValue) { + @NotNull public Builder defaultValue(String defaultValue) { if (this.defaultValue == null) this.defaultValue = new StringOrThing(); this.defaultValue.setString(defaultValue); return this; @@ -158,7 +162,7 @@ public Builder defaultValue(String defaultValue) { /** * The default value of the input. For properties that expect a literal, the default is a literal value, for properties that expect an object, it's an ID reference to one of the current values. */ - public Builder defaultValue(Thing thing) { + @NotNull public Builder defaultValue(Thing thing) { if (this.defaultValue == null) this.defaultValue = new StringOrThing(); this.defaultValue.setThing(thing); return this; @@ -166,35 +170,35 @@ public Builder defaultValue(Thing thing) { /** * The default value of the input. For properties that expect a literal, the default is a literal value, for properties that expect an object, it's an ID reference to one of the current values. */ - public Builder defaultValue(Thing.Builder thing) { + @NotNull public Builder defaultValue(Thing.Builder thing) { return this.defaultValue(thing.build()); } /** * Whether or not a property is mutable. Default is false. Specifying this for a property that also has a value makes it act similar to a "hidden" input in an HTML form. */ - public Builder readonlyValue(Boolean readonlyValue) { + @NotNull public Builder readonlyValue(Boolean readonlyValue) { this.readonlyValue = readonlyValue; return this; } /** * Whether multiple values are allowed for the property. Default is false. */ - public Builder multipleValues(Boolean multipleValues) { + @NotNull public Builder multipleValues(Boolean multipleValues) { this.multipleValues = multipleValues; return this; } /** * Specifies the minimum allowed range for number of characters in a literal value. */ - public Builder valueMinLength(Integer integer) { + @NotNull public Builder valueMinLength(int valueMinLength) { if (this.valueMinLength == null) this.valueMinLength = new Number(); - this.valueMinLength.setInteger(integer); + this.valueMinLength.setInt(valueMinLength); return this; } /** * Specifies the minimum allowed range for number of characters in a literal value. */ - public Builder valueMinLength(Long valueMinLength) { + @NotNull public Builder valueMinLength(long valueMinLength) { if (this.valueMinLength == null) this.valueMinLength = new Number(); this.valueMinLength.setLong(valueMinLength); return this; @@ -202,7 +206,7 @@ public Builder valueMinLength(Long valueMinLength) { /** * Specifies the minimum allowed range for number of characters in a literal value. */ - public Builder valueMinLength(Float valueMinLength) { + @NotNull public Builder valueMinLength(float valueMinLength) { if (this.valueMinLength == null) this.valueMinLength = new Number(); this.valueMinLength.setFloat(valueMinLength); return this; @@ -210,7 +214,7 @@ public Builder valueMinLength(Float valueMinLength) { /** * Specifies the minimum allowed range for number of characters in a literal value. */ - public Builder valueMinLength(Double valueMinLength) { + @NotNull public Builder valueMinLength(double valueMinLength) { if (this.valueMinLength == null) this.valueMinLength = new Number(); this.valueMinLength.setDouble(valueMinLength); return this; @@ -218,7 +222,7 @@ public Builder valueMinLength(Double valueMinLength) { /** * Specifies the minimum allowed range for number of characters in a literal value. */ - public Builder valueMinLength(String valueMinLength) { + @NotNull public Builder valueMinLength(String valueMinLength) { if (this.valueMinLength == null) this.valueMinLength = new Number(); this.valueMinLength.setString(valueMinLength); return this; @@ -226,15 +230,15 @@ public Builder valueMinLength(String valueMinLength) { /** * Specifies the allowed range for number of characters in a literal value. */ - public Builder valueMaxLength(Integer integer) { + @NotNull public Builder valueMaxLength(int valueMaxLength) { if (this.valueMaxLength == null) this.valueMaxLength = new Number(); - this.valueMaxLength.setInteger(integer); + this.valueMaxLength.setInt(valueMaxLength); return this; } /** * Specifies the allowed range for number of characters in a literal value. */ - public Builder valueMaxLength(Long valueMaxLength) { + @NotNull public Builder valueMaxLength(long valueMaxLength) { if (this.valueMaxLength == null) this.valueMaxLength = new Number(); this.valueMaxLength.setLong(valueMaxLength); return this; @@ -242,7 +246,7 @@ public Builder valueMaxLength(Long valueMaxLength) { /** * Specifies the allowed range for number of characters in a literal value. */ - public Builder valueMaxLength(Float valueMaxLength) { + @NotNull public Builder valueMaxLength(float valueMaxLength) { if (this.valueMaxLength == null) this.valueMaxLength = new Number(); this.valueMaxLength.setFloat(valueMaxLength); return this; @@ -250,7 +254,7 @@ public Builder valueMaxLength(Float valueMaxLength) { /** * Specifies the allowed range for number of characters in a literal value. */ - public Builder valueMaxLength(Double valueMaxLength) { + @NotNull public Builder valueMaxLength(double valueMaxLength) { if (this.valueMaxLength == null) this.valueMaxLength = new Number(); this.valueMaxLength.setDouble(valueMaxLength); return this; @@ -258,7 +262,7 @@ public Builder valueMaxLength(Double valueMaxLength) { /** * Specifies the allowed range for number of characters in a literal value. */ - public Builder valueMaxLength(String valueMaxLength) { + @NotNull public Builder valueMaxLength(String valueMaxLength) { if (this.valueMaxLength == null) this.valueMaxLength = new Number(); this.valueMaxLength.setString(valueMaxLength); return this; @@ -266,22 +270,22 @@ public Builder valueMaxLength(String valueMaxLength) { /** * Specifies a regular expression for testing literal values according to the HTML spec. */ - public Builder valuePattern(String valuePattern) { + @NotNull public Builder valuePattern(String valuePattern) { this.valuePattern = valuePattern; return this; } /** * The stepValue attribute indicates the granularity that is expected (and required) of the value in a PropertyValueSpecification. */ - public Builder stepValue(Integer integer) { + @NotNull public Builder stepValue(int stepValue) { if (this.stepValue == null) this.stepValue = new Number(); - this.stepValue.setInteger(integer); + this.stepValue.setInt(stepValue); return this; } /** * The stepValue attribute indicates the granularity that is expected (and required) of the value in a PropertyValueSpecification. */ - public Builder stepValue(Long stepValue) { + @NotNull public Builder stepValue(long stepValue) { if (this.stepValue == null) this.stepValue = new Number(); this.stepValue.setLong(stepValue); return this; @@ -289,7 +293,7 @@ public Builder stepValue(Long stepValue) { /** * The stepValue attribute indicates the granularity that is expected (and required) of the value in a PropertyValueSpecification. */ - public Builder stepValue(Float stepValue) { + @NotNull public Builder stepValue(float stepValue) { if (this.stepValue == null) this.stepValue = new Number(); this.stepValue.setFloat(stepValue); return this; @@ -297,7 +301,7 @@ public Builder stepValue(Float stepValue) { /** * The stepValue attribute indicates the granularity that is expected (and required) of the value in a PropertyValueSpecification. */ - public Builder stepValue(Double stepValue) { + @NotNull public Builder stepValue(double stepValue) { if (this.stepValue == null) this.stepValue = new Number(); this.stepValue.setDouble(stepValue); return this; @@ -305,7 +309,7 @@ public Builder stepValue(Double stepValue) { /** * The stepValue attribute indicates the granularity that is expected (and required) of the value in a PropertyValueSpecification. */ - public Builder stepValue(String stepValue) { + @NotNull public Builder stepValue(String stepValue) { if (this.stepValue == null) this.stepValue = new Number(); this.stepValue.setString(stepValue); return this; @@ -313,21 +317,21 @@ public Builder stepValue(String stepValue) { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -361,7 +365,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -396,7 +400,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -429,7 +433,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -437,38 +441,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -496,46 +500,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder minValue(Integer integer); - Builder minValue(Long minValue); - Builder minValue(Float minValue); - Builder minValue(Double minValue); - Builder minValue(String minValue); - Builder valueName(String valueName); - Builder valueRequired(Boolean valueRequired); - Builder defaultValue(String defaultValue); - Builder defaultValue(Thing thing); - Builder defaultValue(Thing.Builder thing); - Builder readonlyValue(Boolean readonlyValue); - Builder multipleValues(Boolean multipleValues); - Builder valueMinLength(Integer integer); - Builder valueMinLength(Long valueMinLength); - Builder valueMinLength(Float valueMinLength); - Builder valueMinLength(Double valueMinLength); - Builder valueMinLength(String valueMinLength); - Builder valueMaxLength(Integer integer); - Builder valueMaxLength(Long valueMaxLength); - Builder valueMaxLength(Float valueMaxLength); - Builder valueMaxLength(Double valueMaxLength); - Builder valueMaxLength(String valueMaxLength); - Builder valuePattern(String valuePattern); - Builder stepValue(Integer integer); - Builder stepValue(Long stepValue); - Builder stepValue(Float stepValue); - Builder stepValue(Double stepValue); - Builder stepValue(String stepValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder minValue(int minValue); + @NotNull Builder minValue(long minValue); + @NotNull Builder minValue(float minValue); + @NotNull Builder minValue(double minValue); + @NotNull Builder minValue(String minValue); + @NotNull Builder valueName(String valueName); + @NotNull Builder valueRequired(Boolean valueRequired); + @NotNull Builder defaultValue(String defaultValue); + @NotNull Builder defaultValue(Thing thing); + @NotNull Builder defaultValue(Thing.Builder thing); + @NotNull Builder readonlyValue(Boolean readonlyValue); + @NotNull Builder multipleValues(Boolean multipleValues); + @NotNull Builder valueMinLength(int valueMinLength); + @NotNull Builder valueMinLength(long valueMinLength); + @NotNull Builder valueMinLength(float valueMinLength); + @NotNull Builder valueMinLength(double valueMinLength); + @NotNull Builder valueMinLength(String valueMinLength); + @NotNull Builder valueMaxLength(int valueMaxLength); + @NotNull Builder valueMaxLength(long valueMaxLength); + @NotNull Builder valueMaxLength(float valueMaxLength); + @NotNull Builder valueMaxLength(double valueMaxLength); + @NotNull Builder valueMaxLength(String valueMaxLength); + @NotNull Builder valuePattern(String valuePattern); + @NotNull Builder stepValue(int stepValue); + @NotNull Builder stepValue(long stepValue); + @NotNull Builder stepValue(float stepValue); + @NotNull Builder stepValue(double stepValue); + @NotNull Builder stepValue(String stepValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PropertyValueSpecification(Number minValue, String valueName, Boolean valueRequired, StringOrThing defaultValue, Boolean readonlyValue, Boolean multipleValues, Number valueMinLength, Number valueMaxLength, String valuePattern, Number stepValue, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Protozoa.java b/src/main/java/org/schema/Protozoa.java index fa30abe2..63615ca9 100644 --- a/src/main/java/org/schema/Protozoa.java +++ b/src/main/java/org/schema/Protozoa.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Single-celled organism that causes an infection. */ @@ -25,7 +29,7 @@ public class Protozoa { /** * Builder for {@link Protozoa} */ - public static final class ProtozoaThingBuilder implements Builder { + static final class ProtozoaThingBuilder implements Builder { /** * Creates new {@link Protozoa} instance. */ @@ -34,7 +38,7 @@ public Protozoa build() { } } public interface Builder extends ThingBuilder { - + } protected Protozoa() { diff --git a/src/main/java/org/schema/Psychiatric.java b/src/main/java/org/schema/Psychiatric.java index 590c12cb..36aab481 100644 --- a/src/main/java/org/schema/Psychiatric.java +++ b/src/main/java/org/schema/Psychiatric.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that is concerned with the study, treatment, and prevention of mental illness, using both medical and psychological therapies. */ @@ -25,7 +29,7 @@ public class Psychiatric { /** * Builder for {@link Psychiatric} */ - public static final class PsychiatricThingBuilder implements Builder { + static final class PsychiatricThingBuilder implements Builder { /** * Creates new {@link Psychiatric} instance. */ @@ -34,7 +38,7 @@ public Psychiatric build() { } } public interface Builder extends ThingBuilder { - + } protected Psychiatric() { diff --git a/src/main/java/org/schema/PsychologicalTreatment.java b/src/main/java/org/schema/PsychologicalTreatment.java index c21470ba..8babba41 100644 --- a/src/main/java/org/schema/PsychologicalTreatment.java +++ b/src/main/java/org/schema/PsychologicalTreatment.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A process of care relying upon counseling, dialogue, communication, verbalization aimed at improving a mental health condition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class PsychologicalTreatment extends MedicalTherapy { /** * Builder for {@link PsychologicalTreatment} */ - public static final class PsychologicalTreatmentThingBuilder implements Builder { + static final class PsychologicalTreatmentThingBuilder implements Builder { /** * Creates new {@link PsychologicalTreatment} instance. */ @@ -36,164 +40,164 @@ public PsychologicalTreatment build() { /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -227,7 +231,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -303,38 +307,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -363,40 +367,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PublicHealth.java b/src/main/java/org/schema/PublicHealth.java index dbfa9f3b..1dc5eb04 100644 --- a/src/main/java/org/schema/PublicHealth.java +++ b/src/main/java/org/schema/PublicHealth.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Environment and public health. */ @@ -25,7 +29,7 @@ public class PublicHealth { /** * Builder for {@link PublicHealth} */ - public static final class PublicHealthThingBuilder implements Builder { + static final class PublicHealthThingBuilder implements Builder { /** * Creates new {@link PublicHealth} instance. */ @@ -34,7 +38,7 @@ public PublicHealth build() { } } public interface Builder extends ThingBuilder { - + } protected PublicHealth() { diff --git a/src/main/java/org/schema/PublicSwimmingPool.java b/src/main/java/org/schema/PublicSwimmingPool.java index f29feb1b..476d0260 100644 --- a/src/main/java/org/schema/PublicSwimmingPool.java +++ b/src/main/java/org/schema/PublicSwimmingPool.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A public swimming pool. */ @@ -25,7 +29,7 @@ public class PublicSwimmingPool extends SportsActivityLocation { /** * Builder for {@link PublicSwimmingPool} */ - public static final class PublicSwimmingPoolThingBuilder implements Builder { + static final class PublicSwimmingPoolThingBuilder implements Builder { /** * Creates new {@link PublicSwimmingPool} instance. */ @@ -35,107 +39,107 @@ public PublicSwimmingPool build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/PublicationEvent.java b/src/main/java/org/schema/PublicationEvent.java index 8fca0abd..b71539cc 100644 --- a/src/main/java/org/schema/PublicationEvent.java +++ b/src/main/java/org/schema/PublicationEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A PublicationEvent corresponds indifferently to the event of publication for a CreativeWork of any type e.g. a broadcast event, an on-demand event, a book/journal publication via a variety of delivery media. */ @@ -37,7 +41,7 @@ public BroadcastService getPublishedOn() { /** * Builder for {@link PublicationEvent} */ - public static final class PublicationEventThingBuilder implements Builder { + static final class PublicationEventThingBuilder implements Builder { /** * Creates new {@link PublicationEvent} instance. */ @@ -47,40 +51,40 @@ public PublicationEvent build() { /** * A flag to signal that the publication is accessible for free. */ - public Builder isAccessibleForFree(Boolean isAccessibleForFree) { + @NotNull public Builder isAccessibleForFree(Boolean isAccessibleForFree) { this.isAccessibleForFree = isAccessibleForFree; return this; } /** * A broadcast service associated with the publication event. */ - public Builder publishedOn(BroadcastService broadcastService) { + @NotNull public Builder publishedOn(BroadcastService broadcastService) { this.publishedOn = broadcastService; return this; } /** * A broadcast service associated with the publication event. */ - public Builder publishedOn(BroadcastService.Builder broadcastService) { + @NotNull public Builder publishedOn(BroadcastService.Builder broadcastService) { return this.publishedOn(broadcastService.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -88,13 +92,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -102,13 +106,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -116,13 +120,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -130,53 +134,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -184,13 +188,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -198,20 +202,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -219,13 +223,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -233,113 +237,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -373,7 +377,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -408,7 +412,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -441,7 +445,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -449,38 +453,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -518,59 +522,59 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder isAccessibleForFree(Boolean isAccessibleForFree); - Builder publishedOn(BroadcastService broadcastService); - Builder publishedOn(BroadcastService.Builder broadcastService); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder isAccessibleForFree(Boolean isAccessibleForFree); + @NotNull Builder publishedOn(BroadcastService broadcastService); + @NotNull Builder publishedOn(BroadcastService.Builder broadcastService); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected PublicationEvent(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) { diff --git a/src/main/java/org/schema/PublicationIssue.java b/src/main/java/org/schema/PublicationIssue.java index 78870b1a..41928f81 100644 --- a/src/main/java/org/schema/PublicationIssue.java +++ b/src/main/java/org/schema/PublicationIssue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A part of a successively published publication such as a periodical or publication volume, often numbered, usually containing a grouping of works such as articles. * @@ -29,19 +33,19 @@ public class PublicationIssue extends CreativeWork { /** * Identifies the issue of publication; for example, "iii" or "2". */ - public IntegerOrString getIssueNumber() { + public StringOrInt getIssueNumber() { return myIssueNumber; } /** * The page on which the work ends; for example "138" or "xvi". */ - public IntegerOrString getPageEnd() { + public StringOrInt getPageEnd() { return myPageEnd; } /** * The page on which the work starts; for example "135" or "xiii". */ - public IntegerOrString getPageStart() { + public StringOrInt getPageStart() { return myPageStart; } /** @@ -53,7 +57,7 @@ public String getPagination() { /** * Builder for {@link PublicationIssue} */ - public static final class PublicationIssueThingBuilder implements Builder { + static final class PublicationIssueThingBuilder implements Builder { /** * Creates new {@link PublicationIssue} instance. */ @@ -63,182 +67,182 @@ public PublicationIssue build() { /** * Identifies the issue of publication; for example, "iii" or "2". */ - public Builder issueNumber(Integer integer) { - if (this.issueNumber == null) this.issueNumber = new IntegerOrString(); - this.issueNumber.setInteger(integer); + @NotNull public Builder issueNumber(String issueNumber) { + if (this.issueNumber == null) this.issueNumber = new StringOrInt(); + this.issueNumber.setString(issueNumber); return this; } /** * Identifies the issue of publication; for example, "iii" or "2". */ - public Builder issueNumber(String issueNumber) { - if (this.issueNumber == null) this.issueNumber = new IntegerOrString(); - this.issueNumber.setString(issueNumber); + @NotNull public Builder issueNumber(int issueNumber) { + if (this.issueNumber == null) this.issueNumber = new StringOrInt(); + this.issueNumber.setInt(issueNumber); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -246,13 +250,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -260,20 +264,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -281,13 +285,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -295,40 +299,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -336,13 +340,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -350,13 +354,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -364,13 +368,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -378,21 +382,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -400,7 +404,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -408,7 +412,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -416,7 +420,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -424,7 +428,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -432,13 +436,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -446,101 +450,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -548,13 +552,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -562,35 +566,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -598,13 +602,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -612,53 +616,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -666,13 +670,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -680,127 +684,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -808,7 +812,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -816,7 +820,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -824,7 +828,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -832,20 +836,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -853,13 +857,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -867,66 +871,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -934,13 +938,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -948,40 +952,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1015,7 +1019,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1050,7 +1054,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1083,7 +1087,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1091,47 +1095,47 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private IntegerOrString issueNumber; - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private StringOrInt issueNumber; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; private String schemaVersion; private Thing about; @@ -1189,7 +1193,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1207,159 +1211,159 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder issueNumber(Integer integer); - Builder issueNumber(String issueNumber); - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder issueNumber(String issueNumber); + @NotNull Builder issueNumber(int issueNumber); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected PublicationIssue(IntegerOrString issueNumber, 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) { + protected PublicationIssue(StringOrInt issueNumber, StringOrInt pageEnd, StringOrInt 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, int 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); myIssueNumber = issueNumber; myPageEnd = pageEnd; myPageStart = pageStart; myPagination = pagination; } - private IntegerOrString myIssueNumber; - private IntegerOrString myPageEnd; - private IntegerOrString myPageStart; + private StringOrInt myIssueNumber; + private StringOrInt myPageEnd; + private StringOrInt myPageStart; private String myPagination; } diff --git a/src/main/java/org/schema/PublicationVolume.java b/src/main/java/org/schema/PublicationVolume.java index ab5f9d0a..e09bf040 100644 --- a/src/main/java/org/schema/PublicationVolume.java +++ b/src/main/java/org/schema/PublicationVolume.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A part of a successively published publication such as a periodical or multi-volume work, often numbered. It may represent a time span, such as a year. * @@ -28,13 +32,13 @@ public class PublicationVolume extends CreativeWork { /** * The page on which the work ends; for example "138" or "xvi". */ - public IntegerOrString getPageEnd() { + public StringOrInt getPageEnd() { return myPageEnd; } /** * The page on which the work starts; for example "135" or "xiii". */ - public IntegerOrString getPageStart() { + public StringOrInt getPageStart() { return myPageStart; } /** @@ -46,13 +50,13 @@ public String getPagination() { /** * Identifies the volume of publication or multi-part work; for example, "iii" or "2". */ - public IntegerOrString getVolumeNumber() { + public StringOrInt getVolumeNumber() { return myVolumeNumber; } /** * Builder for {@link PublicationVolume} */ - public static final class PublicationVolumeThingBuilder implements Builder { + static final class PublicationVolumeThingBuilder implements Builder { /** * Creates new {@link PublicationVolume} instance. */ @@ -62,182 +66,182 @@ public PublicationVolume build() { /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Identifies the volume of publication or multi-part work; for example, "iii" or "2". */ - public Builder volumeNumber(Integer integer) { - if (this.volumeNumber == null) this.volumeNumber = new IntegerOrString(); - this.volumeNumber.setInteger(integer); + @NotNull public Builder volumeNumber(String volumeNumber) { + if (this.volumeNumber == null) this.volumeNumber = new StringOrInt(); + this.volumeNumber.setString(volumeNumber); return this; } /** * Identifies the volume of publication or multi-part work; for example, "iii" or "2". */ - public Builder volumeNumber(String volumeNumber) { - if (this.volumeNumber == null) this.volumeNumber = new IntegerOrString(); - this.volumeNumber.setString(volumeNumber); + @NotNull public Builder volumeNumber(int volumeNumber) { + if (this.volumeNumber == null) this.volumeNumber = new StringOrInt(); + this.volumeNumber.setInt(volumeNumber); return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -245,13 +249,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -259,20 +263,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -280,13 +284,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -294,40 +298,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -335,13 +339,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -349,13 +353,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -377,21 +381,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -399,7 +403,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -407,7 +411,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -415,7 +419,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -423,7 +427,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -431,13 +435,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -445,101 +449,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -547,13 +551,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -561,35 +565,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -597,13 +601,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -611,53 +615,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -665,13 +669,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -679,127 +683,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -807,7 +811,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -815,7 +819,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -823,7 +827,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -831,20 +835,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -852,13 +856,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -866,66 +870,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -933,13 +937,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -947,40 +951,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1014,7 +1018,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1049,7 +1053,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1082,7 +1086,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1090,48 +1094,48 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; - private IntegerOrString volumeNumber; + private StringOrInt volumeNumber; private String schemaVersion; private Thing about; private String accessibilityAPI; @@ -1188,7 +1192,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1206,159 +1210,159 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder volumeNumber(Integer integer); - Builder volumeNumber(String volumeNumber); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder volumeNumber(String volumeNumber); + @NotNull Builder volumeNumber(int volumeNumber); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected PublicationVolume(IntegerOrString pageEnd, IntegerOrString pageStart, String pagination, IntegerOrString volumeNumber, 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) { + protected PublicationVolume(StringOrInt pageEnd, StringOrInt pageStart, String pagination, StringOrInt volumeNumber, 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, int 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); myPageEnd = pageEnd; myPageStart = pageStart; myPagination = pagination; myVolumeNumber = volumeNumber; } - private IntegerOrString myPageEnd; - private IntegerOrString myPageStart; + private StringOrInt myPageEnd; + private StringOrInt myPageStart; private String myPagination; - private IntegerOrString myVolumeNumber; + private StringOrInt myVolumeNumber; } diff --git a/src/main/java/org/schema/Pulmonary.java b/src/main/java/org/schema/Pulmonary.java index 713ec985..596c305b 100644 --- a/src/main/java/org/schema/Pulmonary.java +++ b/src/main/java/org/schema/Pulmonary.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to the study of the respiratory system and its respective disease states. */ @@ -25,7 +29,7 @@ public class Pulmonary { /** * Builder for {@link Pulmonary} */ - public static final class PulmonaryThingBuilder implements Builder { + static final class PulmonaryThingBuilder implements Builder { /** * Creates new {@link Pulmonary} instance. */ @@ -34,7 +38,7 @@ public Pulmonary build() { } } public interface Builder extends ThingBuilder { - + } protected Pulmonary() { diff --git a/src/main/java/org/schema/QAPage.java b/src/main/java/org/schema/QAPage.java index 5f5e9738..e4a8ed16 100644 --- a/src/main/java/org/schema/QAPage.java +++ b/src/main/java/org/schema/QAPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A QAPage is a WebPage focussed on a specific Question and its Answer(s), e.g. in a question answering site or documenting Frequently Asked Questions (FAQs). */ @@ -25,7 +29,7 @@ public class QAPage extends WebPage { /** * Builder for {@link QAPage} */ - public static final class QAPageThingBuilder implements Builder { + static final class QAPageThingBuilder implements Builder { /** * Creates new {@link QAPage} instance. */ @@ -35,7 +39,7 @@ public QAPage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/QualitativeValue.java b/src/main/java/org/schema/QualitativeValue.java index c01dec4b..9401a02b 100644 --- a/src/main/java/org/schema/QualitativeValue.java +++ b/src/main/java/org/schema/QualitativeValue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A predefined value for a product characteristic, e.g. the power cord plug type "US" or the garment sizes "S", "M", "L", and "XL". * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -77,7 +81,7 @@ public PropertyValue getAdditionalProperty() { /** * Builder for {@link QualitativeValue} */ - public static final class QualitativeValueThingBuilder implements Builder { + static final class QualitativeValueThingBuilder implements Builder { /** * Creates new {@link QualitativeValue} instance. */ @@ -87,85 +91,85 @@ public QualitativeValue build() { /** * This ordering relation for qualitative values indicates that the subject is equal to the object. */ - public Builder equal(QualitativeValue qualitativeValue) { + @NotNull public Builder equal(QualitativeValue qualitativeValue) { this.equal = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is equal to the object. */ - public Builder equal(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder equal(QualitativeValue.Builder qualitativeValue) { return this.equal(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is greater than the object. */ - public Builder greater(QualitativeValue qualitativeValue) { + @NotNull public Builder greater(QualitativeValue qualitativeValue) { this.greater = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is greater than the object. */ - public Builder greater(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder greater(QualitativeValue.Builder qualitativeValue) { return this.greater(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is greater than or equal to the object. */ - public Builder greaterOrEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder greaterOrEqual(QualitativeValue qualitativeValue) { this.greaterOrEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is greater than or equal to the object. */ - public Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue) { return this.greaterOrEqual(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is lesser than the object. */ - public Builder lesser(QualitativeValue qualitativeValue) { + @NotNull public Builder lesser(QualitativeValue qualitativeValue) { this.lesser = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is lesser than the object. */ - public Builder lesser(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lesser(QualitativeValue.Builder qualitativeValue) { return this.lesser(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object. */ - public Builder lesserOrEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder lesserOrEqual(QualitativeValue qualitativeValue) { this.lesserOrEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object. */ - public Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue) { return this.lesserOrEqual(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is not equal to the object. */ - public Builder nonEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder nonEqual(QualitativeValue qualitativeValue) { this.nonEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is not equal to the object. */ - public Builder nonEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder nonEqual(QualitativeValue.Builder qualitativeValue) { return this.nonEqual(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration enumeration) { + @NotNull public Builder valueReference(Enumeration enumeration) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setEnumeration(enumeration); return this; @@ -173,13 +177,13 @@ public Builder valueReference(Enumeration enumeration) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration.Builder enumeration) { + @NotNull public Builder valueReference(Enumeration.Builder enumeration) { return this.valueReference(enumeration.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue propertyValue) { + @NotNull public Builder valueReference(PropertyValue propertyValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setPropertyValue(propertyValue); return this; @@ -187,13 +191,13 @@ public Builder valueReference(PropertyValue propertyValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue.Builder propertyValue) { + @NotNull public Builder valueReference(PropertyValue.Builder propertyValue) { return this.valueReference(propertyValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue qualitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQualitativeValue(qualitativeValue); return this; @@ -201,13 +205,13 @@ public Builder valueReference(QualitativeValue qualitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue.Builder qualitativeValue) { return this.valueReference(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue quantitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQuantitativeValue(quantitativeValue); return this; @@ -215,13 +219,13 @@ public Builder valueReference(QuantitativeValue quantitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { return this.valueReference(quantitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue structuredValue) { + @NotNull public Builder valueReference(StructuredValue structuredValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setStructuredValue(structuredValue); return this; @@ -229,7 +233,7 @@ public Builder valueReference(StructuredValue structuredValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue.Builder structuredValue) { + @NotNull public Builder valueReference(StructuredValue.Builder structuredValue) { return this.valueReference(structuredValue.build()); } /** @@ -238,7 +242,7 @@ public Builder valueReference(StructuredValue.Builder structuredValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -248,13 +252,13 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -262,13 +266,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -276,27 +280,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -330,7 +334,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -365,7 +369,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -398,7 +402,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -406,38 +410,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -464,46 +468,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder equal(QualitativeValue qualitativeValue); - Builder equal(QualitativeValue.Builder qualitativeValue); - Builder greater(QualitativeValue qualitativeValue); - Builder greater(QualitativeValue.Builder qualitativeValue); - Builder greaterOrEqual(QualitativeValue qualitativeValue); - Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue); - Builder lesser(QualitativeValue qualitativeValue); - Builder lesser(QualitativeValue.Builder qualitativeValue); - Builder lesserOrEqual(QualitativeValue qualitativeValue); - Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue); - Builder nonEqual(QualitativeValue qualitativeValue); - Builder nonEqual(QualitativeValue.Builder qualitativeValue); - Builder valueReference(Enumeration enumeration); - Builder valueReference(Enumeration.Builder enumeration); - Builder valueReference(PropertyValue propertyValue); - Builder valueReference(PropertyValue.Builder propertyValue); - Builder valueReference(QualitativeValue qualitativeValue); - Builder valueReference(QualitativeValue.Builder qualitativeValue); - Builder valueReference(QuantitativeValue quantitativeValue); - Builder valueReference(QuantitativeValue.Builder quantitativeValue); - Builder valueReference(StructuredValue structuredValue); - Builder valueReference(StructuredValue.Builder structuredValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder equal(QualitativeValue qualitativeValue); + @NotNull Builder equal(QualitativeValue.Builder qualitativeValue); + @NotNull Builder greater(QualitativeValue qualitativeValue); + @NotNull Builder greater(QualitativeValue.Builder qualitativeValue); + @NotNull Builder greaterOrEqual(QualitativeValue qualitativeValue); + @NotNull Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lesser(QualitativeValue qualitativeValue); + @NotNull Builder lesser(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lesserOrEqual(QualitativeValue qualitativeValue); + @NotNull Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder nonEqual(QualitativeValue qualitativeValue); + @NotNull Builder nonEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(Enumeration enumeration); + @NotNull Builder valueReference(Enumeration.Builder enumeration); + @NotNull Builder valueReference(PropertyValue propertyValue); + @NotNull Builder valueReference(PropertyValue.Builder propertyValue); + @NotNull Builder valueReference(QualitativeValue qualitativeValue); + @NotNull Builder valueReference(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(QuantitativeValue quantitativeValue); + @NotNull Builder valueReference(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder valueReference(StructuredValue structuredValue); + @NotNull Builder valueReference(StructuredValue.Builder structuredValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected QualitativeValue(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) { diff --git a/src/main/java/org/schema/QualitativeValueOrString.java b/src/main/java/org/schema/QualitativeValueOrString.java index 14372fdf..c79a4513 100644 --- a/src/main/java/org/schema/QualitativeValueOrString.java +++ b/src/main/java/org/schema/QualitativeValueOrString.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class QualitativeValueOrString { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myQualitativeValue != null) return myQualitativeValue; if (myString != null) return myString; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setQualitativeValue(QualitativeValue qualitativeValue) { clear(); myQualitativeValue = qualitativeValue; } public QualitativeValue getQualitativeValue() { return myQualitativeValue; } - private QualitativeValue myQualitativeValue; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + private QualitativeValue myQualitativeValue; private String myString; private void clear() { myQualitativeValue = null; diff --git a/src/main/java/org/schema/QuantitativeValue.java b/src/main/java/org/schema/QuantitativeValue.java index 28d8a0ee..b9d84572 100644 --- a/src/main/java/org/schema/QuantitativeValue.java +++ b/src/main/java/org/schema/QuantitativeValue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A point value or interval for product characteristics and other purposes. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -72,7 +76,7 @@ public String getUnitText() { /** * Builder for {@link QuantitativeValue} */ - public static final class QuantitativeValueThingBuilder implements Builder { + static final class QuantitativeValueThingBuilder implements Builder { /** * Creates new {@link QuantitativeValue} instance. */ @@ -82,15 +86,15 @@ public QuantitativeValue build() { /** * The upper value of some characteristic or property. */ - public Builder maxValue(Integer integer) { + @NotNull public Builder maxValue(int maxValue) { if (this.maxValue == null) this.maxValue = new Number(); - this.maxValue.setInteger(integer); + this.maxValue.setInt(maxValue); return this; } /** * The upper value of some characteristic or property. */ - public Builder maxValue(Long maxValue) { + @NotNull public Builder maxValue(long maxValue) { if (this.maxValue == null) this.maxValue = new Number(); this.maxValue.setLong(maxValue); return this; @@ -98,7 +102,7 @@ public Builder maxValue(Long maxValue) { /** * The upper value of some characteristic or property. */ - public Builder maxValue(Float maxValue) { + @NotNull public Builder maxValue(float maxValue) { if (this.maxValue == null) this.maxValue = new Number(); this.maxValue.setFloat(maxValue); return this; @@ -106,7 +110,7 @@ public Builder maxValue(Float maxValue) { /** * The upper value of some characteristic or property. */ - public Builder maxValue(Double maxValue) { + @NotNull public Builder maxValue(double maxValue) { if (this.maxValue == null) this.maxValue = new Number(); this.maxValue.setDouble(maxValue); return this; @@ -114,7 +118,7 @@ public Builder maxValue(Double maxValue) { /** * The upper value of some characteristic or property. */ - public Builder maxValue(String maxValue) { + @NotNull public Builder maxValue(String maxValue) { if (this.maxValue == null) this.maxValue = new Number(); this.maxValue.setString(maxValue); return this; @@ -122,15 +126,15 @@ public Builder maxValue(String maxValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(Integer integer) { + @NotNull public Builder minValue(int minValue) { if (this.minValue == null) this.minValue = new Number(); - this.minValue.setInteger(integer); + this.minValue.setInt(minValue); return this; } /** * The lower value of some characteristic or property. */ - public Builder minValue(Long minValue) { + @NotNull public Builder minValue(long minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setLong(minValue); return this; @@ -138,7 +142,7 @@ public Builder minValue(Long minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(Float minValue) { + @NotNull public Builder minValue(float minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setFloat(minValue); return this; @@ -146,7 +150,7 @@ public Builder minValue(Float minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(Double minValue) { + @NotNull public Builder minValue(double minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setDouble(minValue); return this; @@ -154,7 +158,7 @@ public Builder minValue(Double minValue) { /** * The lower value of some characteristic or property. */ - public Builder minValue(String minValue) { + @NotNull public Builder minValue(String minValue) { if (this.minValue == null) this.minValue = new Number(); this.minValue.setString(minValue); return this; @@ -162,14 +166,14 @@ public Builder minValue(String minValue) { /** * The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon. */ - public Builder unitCode(String unitCode) { + @NotNull public Builder unitCode(String unitCode) { this.unitCode = unitCode; 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'. */ - public Builder value(Boolean value) { + @NotNull public Builder value(Boolean value) { if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); this.value.setBoolean(value); return this; @@ -177,7 +181,7 @@ public Builder value(Boolean value) { /** * 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 Builder value(Number number) { + @NotNull public Builder value(Number number) { if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); this.value.setNumber(number); return this; @@ -185,7 +189,7 @@ public Builder value(Number number) { /** * 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 Builder value(String value) { + @NotNull public Builder value(String value) { if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); this.value.setString(value); return this; @@ -193,7 +197,7 @@ public Builder value(String value) { /** * 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 Builder value(StructuredValue structuredValue) { + @NotNull public Builder value(StructuredValue structuredValue) { if (this.value == null) this.value = new BooleanOrNumberOrStringOrStructuredValue(); this.value.setStructuredValue(structuredValue); return this; @@ -201,13 +205,13 @@ public Builder value(StructuredValue structuredValue) { /** * 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 Builder value(StructuredValue.Builder structuredValue) { + @NotNull public Builder value(StructuredValue.Builder structuredValue) { return this.value(structuredValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration enumeration) { + @NotNull public Builder valueReference(Enumeration enumeration) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setEnumeration(enumeration); return this; @@ -215,13 +219,13 @@ public Builder valueReference(Enumeration enumeration) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration.Builder enumeration) { + @NotNull public Builder valueReference(Enumeration.Builder enumeration) { return this.valueReference(enumeration.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue propertyValue) { + @NotNull public Builder valueReference(PropertyValue propertyValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setPropertyValue(propertyValue); return this; @@ -229,13 +233,13 @@ public Builder valueReference(PropertyValue propertyValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue.Builder propertyValue) { + @NotNull public Builder valueReference(PropertyValue.Builder propertyValue) { return this.valueReference(propertyValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue qualitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQualitativeValue(qualitativeValue); return this; @@ -243,13 +247,13 @@ public Builder valueReference(QualitativeValue qualitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue.Builder qualitativeValue) { return this.valueReference(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue quantitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQuantitativeValue(quantitativeValue); return this; @@ -257,13 +261,13 @@ public Builder valueReference(QuantitativeValue quantitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { return this.valueReference(quantitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue structuredValue) { + @NotNull public Builder valueReference(StructuredValue structuredValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setStructuredValue(structuredValue); return this; @@ -271,7 +275,7 @@ public Builder valueReference(StructuredValue structuredValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue.Builder structuredValue) { + @NotNull public Builder valueReference(StructuredValue.Builder structuredValue) { return this.valueReference(structuredValue.build()); } /** @@ -280,7 +284,7 @@ public Builder valueReference(StructuredValue.Builder structuredValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -290,35 +294,35 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode. */ - public Builder unitText(String unitText) { + @NotNull public Builder unitText(String unitText) { this.unitText = unitText; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -352,7 +356,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -387,7 +391,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -420,7 +424,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -428,38 +432,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,47 +488,47 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder maxValue(Integer integer); - Builder maxValue(Long maxValue); - Builder maxValue(Float maxValue); - Builder maxValue(Double maxValue); - Builder maxValue(String maxValue); - Builder minValue(Integer integer); - Builder minValue(Long minValue); - Builder minValue(Float minValue); - Builder minValue(Double minValue); - Builder minValue(String minValue); - Builder unitCode(String unitCode); - Builder value(Boolean value); - Builder value(Number number); - Builder value(String value); - Builder value(StructuredValue structuredValue); - Builder value(StructuredValue.Builder structuredValue); - Builder valueReference(Enumeration enumeration); - Builder valueReference(Enumeration.Builder enumeration); - Builder valueReference(PropertyValue propertyValue); - Builder valueReference(PropertyValue.Builder propertyValue); - Builder valueReference(QualitativeValue qualitativeValue); - Builder valueReference(QualitativeValue.Builder qualitativeValue); - Builder valueReference(QuantitativeValue quantitativeValue); - Builder valueReference(QuantitativeValue.Builder quantitativeValue); - Builder valueReference(StructuredValue structuredValue); - Builder valueReference(StructuredValue.Builder structuredValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder unitText(String unitText); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder maxValue(int maxValue); + @NotNull Builder maxValue(long maxValue); + @NotNull Builder maxValue(float maxValue); + @NotNull Builder maxValue(double maxValue); + @NotNull Builder maxValue(String maxValue); + @NotNull Builder minValue(int minValue); + @NotNull Builder minValue(long minValue); + @NotNull Builder minValue(float minValue); + @NotNull Builder minValue(double minValue); + @NotNull Builder minValue(String minValue); + @NotNull Builder unitCode(String unitCode); + @NotNull Builder value(Boolean value); + @NotNull Builder value(Number number); + @NotNull Builder value(String value); + @NotNull Builder value(StructuredValue structuredValue); + @NotNull Builder value(StructuredValue.Builder structuredValue); + @NotNull Builder valueReference(Enumeration enumeration); + @NotNull Builder valueReference(Enumeration.Builder enumeration); + @NotNull Builder valueReference(PropertyValue propertyValue); + @NotNull Builder valueReference(PropertyValue.Builder propertyValue); + @NotNull Builder valueReference(QualitativeValue qualitativeValue); + @NotNull Builder valueReference(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(QuantitativeValue quantitativeValue); + @NotNull Builder valueReference(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder valueReference(StructuredValue structuredValue); + @NotNull Builder valueReference(StructuredValue.Builder structuredValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder unitText(String unitText); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/IntegerOrQuantitativeValue.java b/src/main/java/org/schema/QuantitativeValueOrInt.java similarity index 73% rename from src/main/java/org/schema/IntegerOrQuantitativeValue.java rename to src/main/java/org/schema/QuantitativeValueOrInt.java index 6e7b42f8..e597c3b5 100644 --- a/src/main/java/org/schema/IntegerOrQuantitativeValue.java +++ b/src/main/java/org/schema/QuantitativeValueOrInt.java @@ -18,26 +18,29 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) -class IntegerOrQuantitativeValue { - @com.fasterxml.jackson.annotation.JsonValue +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +class QuantitativeValueOrInt { + @JsonValue public Object getJsonLdValue() { - if (myInteger != null) return myInteger; if (myQuantitativeValue != null) return myQuantitativeValue; + if (myInt != null) return myInt; return null; } public Thing getThing() { if (myQuantitativeValue != null) return myQuantitativeValue; return null; } - public void setInteger(Integer integer) { clear(); myInteger = integer; } - public Integer getInteger() { return myInteger; } - private Integer myInteger; public void setQuantitativeValue(QuantitativeValue quantitativeValue) { clear(); myQuantitativeValue = quantitativeValue; } public QuantitativeValue getQuantitativeValue() { return myQuantitativeValue; } + public void setInt(int value) { clear(); myInt = value; } + public int getInt() { return myInt; } private QuantitativeValue myQuantitativeValue; + private Integer myInt; private void clear() { - myInteger = null; myQuantitativeValue = null; + myInt = null; } } diff --git a/src/main/java/org/schema/Quantity.java b/src/main/java/org/schema/Quantity.java index db48161e..dd013917 100644 --- a/src/main/java/org/schema/Quantity.java +++ b/src/main/java/org/schema/Quantity.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Quantities such as distance, time, mass, weight, etc. Particular instances of say Mass are entities like '3 Kg' or '4 milligrams'. */ @@ -25,7 +29,7 @@ public class Quantity extends Intangible { /** * Builder for {@link Quantity} */ - public static final class QuantityThingBuilder implements Builder { + static final class QuantityThingBuilder implements Builder { /** * Creates new {@link Quantity} instance. */ @@ -35,21 +39,21 @@ public Quantity build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Quantity(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Question.java b/src/main/java/org/schema/Question.java index 68925290..fd895177 100644 --- a/src/main/java/org/schema/Question.java +++ b/src/main/java/org/schema/Question.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific question - e.g. from a user seeking answers online, or collected in a Frequently Asked Questions (FAQ) document. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_QAStackExchange @@ -26,19 +30,19 @@ public class Question extends CreativeWork { /** * The number of upvotes this question, answer or comment has received from the community. */ - public Integer getUpvoteCount() { + public int getUpvoteCount() { return myUpvoteCount; } /** * The number of downvotes this question, answer or comment has received from the community. */ - public Integer getDownvoteCount() { + public int getDownvoteCount() { return myDownvoteCount; } /** * The number of answers this question has received. */ - public Integer getAnswerCount() { + public int getAnswerCount() { return myAnswerCount; } /** @@ -56,7 +60,7 @@ public SuggestedAnswer getSuggestedAnswer() { /** * Builder for {@link Question} */ - public static final class QuestionThingBuilder implements Builder { + static final class QuestionThingBuilder implements Builder { /** * Creates new {@link Question} instance. */ @@ -66,168 +70,168 @@ public Question build() { /** * The number of upvotes this question, answer or comment has received from the community. */ - public Builder upvoteCount(Integer integer) { - this.upvoteCount = integer; + @NotNull public Builder upvoteCount(int upvoteCount) { + this.upvoteCount = upvoteCount; return this; } /** * The number of downvotes this question, answer or comment has received from the community. */ - public Builder downvoteCount(Integer integer) { - this.downvoteCount = integer; + @NotNull public Builder downvoteCount(int downvoteCount) { + this.downvoteCount = downvoteCount; return this; } /** * The number of answers this question has received. */ - public Builder answerCount(Integer integer) { - this.answerCount = integer; + @NotNull public Builder answerCount(int answerCount) { + this.answerCount = answerCount; return this; } /** * The answer that has been accepted as best, typically on a Question/Answer site. Sites vary in their selection mechanisms, e.g. drawing on community opinion and/or the view of the Question author. */ - public Builder acceptedAnswer(Answer answer) { + @NotNull public Builder acceptedAnswer(Answer answer) { this.acceptedAnswer = answer; return this; } /** * The answer that has been accepted as best, typically on a Question/Answer site. Sites vary in their selection mechanisms, e.g. drawing on community opinion and/or the view of the Question author. */ - public Builder acceptedAnswer(Answer.Builder answer) { + @NotNull public Builder acceptedAnswer(Answer.Builder answer) { return this.acceptedAnswer(answer.build()); } /** * An answer (possibly one of several, possibly incorrect) to a Question, e.g. on a Question/Answer site. */ - public Builder suggestedAnswer(SuggestedAnswer suggestedAnswer) { + @NotNull public Builder suggestedAnswer(SuggestedAnswer suggestedAnswer) { this.suggestedAnswer = suggestedAnswer; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -235,13 +239,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -249,20 +253,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -270,13 +274,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -284,40 +288,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -325,13 +329,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -339,13 +343,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -353,13 +357,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -367,21 +371,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -389,7 +393,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -397,7 +401,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -405,7 +409,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -413,7 +417,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -421,13 +425,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -435,101 +439,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -537,13 +541,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -551,35 +555,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -587,13 +591,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -601,53 +605,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -655,13 +659,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -669,127 +673,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -797,7 +801,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -805,7 +809,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -813,7 +817,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -821,20 +825,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -842,13 +846,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -856,66 +860,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -923,13 +927,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -937,40 +941,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1004,7 +1008,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1039,7 +1043,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1072,7 +1076,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1080,47 +1084,47 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private Integer upvoteCount; - private Integer downvoteCount; - private Integer answerCount; + private int upvoteCount; + private int downvoteCount; + private int answerCount; private Answer acceptedAnswer; private SuggestedAnswer suggestedAnswer; private String schemaVersion; @@ -1179,7 +1183,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1197,150 +1201,150 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder upvoteCount(Integer integer); - Builder downvoteCount(Integer integer); - Builder answerCount(Integer integer); - Builder acceptedAnswer(Answer answer); - Builder acceptedAnswer(Answer.Builder answer); - Builder suggestedAnswer(SuggestedAnswer suggestedAnswer); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder upvoteCount(int upvoteCount); + @NotNull Builder downvoteCount(int downvoteCount); + @NotNull Builder answerCount(int answerCount); + @NotNull Builder acceptedAnswer(Answer answer); + @NotNull Builder acceptedAnswer(Answer.Builder answer); + @NotNull Builder suggestedAnswer(SuggestedAnswer suggestedAnswer); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Question(Integer upvoteCount, Integer downvoteCount, Integer answerCount, Answer acceptedAnswer, SuggestedAnswer suggestedAnswer, 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) { + protected Question(int upvoteCount, int downvoteCount, int answerCount, Answer acceptedAnswer, SuggestedAnswer suggestedAnswer, 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, int 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); myUpvoteCount = upvoteCount; myDownvoteCount = downvoteCount; @@ -1348,9 +1352,9 @@ protected Question(Integer upvoteCount, Integer downvoteCount, Integer answerCou myAcceptedAnswer = acceptedAnswer; mySuggestedAnswer = suggestedAnswer; } - private Integer myUpvoteCount; - private Integer myDownvoteCount; - private Integer myAnswerCount; + private int myUpvoteCount; + private int myDownvoteCount; + private int myAnswerCount; private Answer myAcceptedAnswer; private SuggestedAnswer mySuggestedAnswer; } diff --git a/src/main/java/org/schema/QuoteAction.java b/src/main/java/org/schema/QuoteAction.java index 3ceb9bed..4d428b7e 100644 --- a/src/main/java/org/schema/QuoteAction.java +++ b/src/main/java/org/schema/QuoteAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent quotes/estimates/appraises an object/product/service with a price at a location/store. */ @@ -25,7 +29,7 @@ public class QuoteAction extends TradeAction { /** * Builder for {@link QuoteAction} */ - public static final class QuoteActionThingBuilder implements Builder { + static final class QuoteActionThingBuilder implements Builder { /** * Creates new {@link QuoteAction} instance. */ @@ -55,7 +59,7 @@ public QuoteAction build() { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -83,7 +87,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -91,20 +95,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -112,13 +116,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -126,7 +130,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -134,7 +138,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -143,67 +147,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -237,7 +241,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -272,7 +276,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -305,7 +309,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -313,38 +317,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -370,34 +374,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/RNews.java b/src/main/java/org/schema/RNews.java index 706bc062..bcdb9d79 100644 --- a/src/main/java/org/schema/RNews.java +++ b/src/main/java/org/schema/RNews.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This class contains derivatives of IPTC rNews properties. rNews is a data model of publishing metadata with serializations currently available for RDFa as well as HTML5 Microdata. More information about the IPTC and rNews can be found at rnews.org. */ @@ -25,7 +29,7 @@ public class RNews { /** * Builder for {@link RNews} */ - public static final class RNewsThingBuilder implements Builder { + static final class RNewsThingBuilder implements Builder { /** * Creates new {@link RNews} instance. */ @@ -34,7 +38,7 @@ public RNews build() { } } public interface Builder extends ThingBuilder { - + } protected RNews() { diff --git a/src/main/java/org/schema/RVPark.java b/src/main/java/org/schema/RVPark.java index 095c295e..6006d10a 100644 --- a/src/main/java/org/schema/RVPark.java +++ b/src/main/java/org/schema/RVPark.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A place offering space for "Recreational Vehicles", Caravans, mobile homes and the like. */ @@ -25,7 +29,7 @@ public class RVPark extends CivicStructure { /** * Builder for {@link RVPark} */ - public static final class RVParkThingBuilder implements Builder { + static final class RVParkThingBuilder implements Builder { /** * Creates new {@link RVPark} instance. */ @@ -35,73 +39,73 @@ public RVPark build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RadiationTherapy.java b/src/main/java/org/schema/RadiationTherapy.java index f90a9578..7b1b8080 100644 --- a/src/main/java/org/schema/RadiationTherapy.java +++ b/src/main/java/org/schema/RadiationTherapy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A process of care using radiation aimed at improving a health condition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class RadiationTherapy extends MedicalTherapy { /** * Builder for {@link RadiationTherapy} */ - public static final class RadiationTherapyThingBuilder implements Builder { + static final class RadiationTherapyThingBuilder implements Builder { /** * Creates new {@link RadiationTherapy} instance. */ @@ -36,164 +40,164 @@ public RadiationTherapy build() { /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -227,7 +231,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -303,38 +307,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -363,40 +367,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RadioChannel.java b/src/main/java/org/schema/RadioChannel.java index 8114b1db..483bae19 100644 --- a/src/main/java/org/schema/RadioChannel.java +++ b/src/main/java/org/schema/RadioChannel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A unique instance of a radio BroadcastService on a CableOrSatelliteService lineup. */ @@ -25,7 +29,7 @@ public class RadioChannel extends BroadcastChannel { /** * Builder for {@link RadioChannel} */ - public static final class RadioChannelThingBuilder implements Builder { + static final class RadioChannelThingBuilder implements Builder { /** * Creates new {@link RadioChannel} instance. */ @@ -35,61 +39,61 @@ public RadioChannel build() { /** * The unique address by which the BroadcastService can be identified in a provider lineup. In US, this is typically a number. */ - public Builder broadcastChannelId(String broadcastChannelId) { + @NotNull public Builder broadcastChannelId(String broadcastChannelId) { this.broadcastChannelId = broadcastChannelId; return this; } /** * The CableOrSatelliteService offering the channel. */ - public Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService) { + @NotNull public Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService) { this.inBroadcastLineup = cableOrSatelliteService; return this; } /** * The CableOrSatelliteService offering the channel. */ - public Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService) { + @NotNull public Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService) { return this.inBroadcastLineup(cableOrSatelliteService.build()); } /** * The type of service required to have access to the channel (e.g. Standard or Premium). */ - public Builder broadcastServiceTier(String broadcastServiceTier) { + @NotNull public Builder broadcastServiceTier(String broadcastServiceTier) { this.broadcastServiceTier = broadcastServiceTier; return this; } /** * The BroadcastService offered on this channel. */ - public Builder providesBroadcastService(BroadcastService broadcastService) { + @NotNull public Builder providesBroadcastService(BroadcastService broadcastService) { this.providesBroadcastService = broadcastService; return this; } /** * The BroadcastService offered on this channel. */ - public Builder providesBroadcastService(BroadcastService.Builder broadcastService) { + @NotNull public Builder providesBroadcastService(BroadcastService.Builder broadcastService) { return this.providesBroadcastService(broadcastService.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -123,7 +127,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -158,7 +162,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -191,7 +195,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -199,38 +203,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -252,24 +256,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder broadcastChannelId(String broadcastChannelId); - Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService); - Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService); - Builder broadcastServiceTier(String broadcastServiceTier); - Builder providesBroadcastService(BroadcastService broadcastService); - Builder providesBroadcastService(BroadcastService.Builder broadcastService); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder broadcastChannelId(String broadcastChannelId); + @NotNull Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService); + @NotNull Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService); + @NotNull Builder broadcastServiceTier(String broadcastServiceTier); + @NotNull Builder providesBroadcastService(BroadcastService broadcastService); + @NotNull Builder providesBroadcastService(BroadcastService.Builder broadcastService); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RadioClip.java b/src/main/java/org/schema/RadioClip.java index 511a498c..2ec76aca 100644 --- a/src/main/java/org/schema/RadioClip.java +++ b/src/main/java/org/schema/RadioClip.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A short radio program or a segment/part of a radio program. */ @@ -25,7 +29,7 @@ public class RadioClip extends Clip { /** * Builder for {@link RadioClip} */ - public static final class RadioClipThingBuilder implements Builder { + static final class RadioClipThingBuilder implements Builder { /** * Creates new {@link RadioClip} instance. */ @@ -35,40 +39,40 @@ public RadioClip build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * Position of the clip within an ordered group of clips. */ - public Builder clipNumber(Position position) { + @NotNull public Builder clipNumber(Position position) { this.clipNumber = position; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -76,13 +80,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -90,154 +94,154 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The episode to which this clip belongs. */ - public Builder partOfEpisode(IsPartOf isPartOf) { + @NotNull public Builder partOfEpisode(IsPartOf isPartOf) { this.partOfEpisode = isPartOf; return this; } /** * The season to which this episode belongs. */ - public Builder partOfSeason(IsPartOf isPartOf) { + @NotNull public Builder partOfSeason(IsPartOf isPartOf) { this.partOfSeason = isPartOf; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -245,13 +249,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -259,20 +263,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -280,13 +284,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -294,40 +298,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -335,13 +339,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -349,13 +353,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -377,21 +381,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -399,7 +403,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -407,7 +411,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -415,7 +419,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -423,7 +427,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -431,13 +435,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -445,101 +449,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -547,13 +551,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -561,35 +565,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -597,13 +601,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -611,53 +615,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -665,13 +669,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -679,127 +683,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -807,7 +811,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -815,7 +819,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -823,7 +827,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -831,20 +835,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -852,13 +856,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -866,66 +870,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -933,13 +937,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -947,40 +951,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1014,7 +1018,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1049,7 +1053,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1082,7 +1086,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1090,38 +1094,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1191,7 +1195,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1209,156 +1213,156 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder clipNumber(Position position); - Builder director(Person person); - Builder director(Person.Builder person); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder partOfEpisode(IsPartOf isPartOf); - Builder partOfSeason(IsPartOf isPartOf); - Builder partOfSeries(IsPartOf isPartOf); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder clipNumber(Position position); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder partOfEpisode(IsPartOf isPartOf); + @NotNull Builder partOfSeason(IsPartOf isPartOf); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/RadioEpisode.java b/src/main/java/org/schema/RadioEpisode.java index c34273d8..8f6af798 100644 --- a/src/main/java/org/schema/RadioEpisode.java +++ b/src/main/java/org/schema/RadioEpisode.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A radio episode which can be part of a series or season. */ @@ -25,7 +29,7 @@ public class RadioEpisode extends Episode { /** * Builder for {@link RadioEpisode} */ - public static final class RadioEpisodeThingBuilder implements Builder { + static final class RadioEpisodeThingBuilder implements Builder { /** * Creates new {@link RadioEpisode} instance. */ @@ -35,49 +39,49 @@ public RadioEpisode build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * Position of the episode within an ordered group of episodes. */ - public Builder episodeNumber(Integer integer) { - if (this.episodeNumber == null) this.episodeNumber = new IntegerOrString(); - this.episodeNumber.setInteger(integer); + @NotNull public Builder episodeNumber(String episodeNumber) { + if (this.episodeNumber == null) this.episodeNumber = new StringOrInt(); + this.episodeNumber.setString(episodeNumber); return this; } /** * Position of the episode within an ordered group of episodes. */ - public Builder episodeNumber(String episodeNumber) { - if (this.episodeNumber == null) this.episodeNumber = new IntegerOrString(); - this.episodeNumber.setString(episodeNumber); + @NotNull public Builder episodeNumber(int episodeNumber) { + if (this.episodeNumber == null) this.episodeNumber = new StringOrInt(); + this.episodeNumber.setInt(episodeNumber); return this; } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -85,13 +89,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -99,173 +103,173 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The season to which this episode belongs. */ - public Builder partOfSeason(IsPartOf isPartOf) { + @NotNull public Builder partOfSeason(IsPartOf isPartOf) { this.partOfSeason = isPartOf; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1158,7 +1162,7 @@ public Builder id(long id) { } private Person actor; private Person director; - private IntegerOrString episodeNumber; + private StringOrInt episodeNumber; private MusicGroupOrPerson musicBy; private IsPartOf partOfSeason; private IsPartOf partOfSeries; @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder episodeNumber(Integer integer); - Builder episodeNumber(String episodeNumber); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder partOfSeason(IsPartOf isPartOf); - Builder partOfSeries(IsPartOf isPartOf); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder episodeNumber(String episodeNumber); + @NotNull Builder episodeNumber(int episodeNumber); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder partOfSeason(IsPartOf isPartOf); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + protected RadioEpisode(Person actor, Person director, StringOrInt 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, int 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); } } diff --git a/src/main/java/org/schema/RadioSeason.java b/src/main/java/org/schema/RadioSeason.java index 218afebb..f6d8f2cf 100644 --- a/src/main/java/org/schema/RadioSeason.java +++ b/src/main/java/org/schema/RadioSeason.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Season dedicated to radio broadcast and associated online delivery. */ @@ -25,7 +29,7 @@ public class RadioSeason extends CreativeWorkSeason { /** * Builder for {@link RadioSeason} */ - public static final class RadioSeasonThingBuilder implements Builder { + static final class RadioSeasonThingBuilder implements Builder { /** * Creates new {@link RadioSeason} instance. */ @@ -35,230 +39,230 @@ public RadioSeason build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An episode of a tv, radio or game media within a series or season. */ - public Builder episode(HasPart hasPart) { + @NotNull public Builder episode(HasPart hasPart) { this.episode = hasPart; return this; } /** * The number of episodes in this season or series. */ - public Builder numberOfEpisodes(Integer integer) { - this.numberOfEpisodes = integer; + @NotNull public Builder numberOfEpisodes(int numberOfEpisodes) { + this.numberOfEpisodes = numberOfEpisodes; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * Position of the season within an ordered group of seasons. */ - public Builder seasonNumber(Integer integer) { - if (this.seasonNumber == null) this.seasonNumber = new IntegerOrString(); - this.seasonNumber.setInteger(integer); + @NotNull public Builder seasonNumber(String seasonNumber) { + if (this.seasonNumber == null) this.seasonNumber = new StringOrInt(); + this.seasonNumber.setString(seasonNumber); return this; } /** * Position of the season within an ordered group of seasons. */ - public Builder seasonNumber(String seasonNumber) { - if (this.seasonNumber == null) this.seasonNumber = new IntegerOrString(); - this.seasonNumber.setString(seasonNumber); + @NotNull public Builder seasonNumber(int seasonNumber) { + if (this.seasonNumber == null) this.seasonNumber = new StringOrInt(); + this.seasonNumber.setInt(seasonNumber); return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -266,13 +270,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -280,20 +284,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -301,13 +305,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -315,40 +319,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -356,13 +360,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -370,13 +374,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -384,13 +388,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -398,21 +402,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -420,7 +424,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -428,7 +432,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -436,7 +440,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -444,7 +448,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -452,13 +456,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -466,101 +470,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -568,13 +572,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -582,35 +586,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -618,13 +622,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -632,53 +636,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -686,13 +690,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -700,127 +704,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -828,7 +832,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -836,7 +840,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -844,7 +848,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -852,20 +856,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -873,13 +877,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -887,66 +891,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -954,13 +958,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -968,40 +972,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1035,7 +1039,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1070,7 +1074,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1103,7 +1107,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1111,38 +1115,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1153,10 +1157,10 @@ public Builder id(long id) { private Person director; private java.util.Date endDate; private HasPart episode; - private Integer numberOfEpisodes; + private int numberOfEpisodes; private IsPartOf partOfSeries; private Organization productionCompany; - private IntegerOrString seasonNumber; + private StringOrInt seasonNumber; private java.util.Date startDate; private VideoObject trailer; private String schemaVersion; @@ -1215,7 +1219,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1233,159 +1237,159 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder endDate(java.util.Date date); - Builder episode(HasPart hasPart); - Builder numberOfEpisodes(Integer integer); - Builder partOfSeries(IsPartOf isPartOf); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder seasonNumber(Integer integer); - Builder seasonNumber(String seasonNumber); - Builder startDate(java.util.Date date); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder episode(HasPart hasPart); + @NotNull Builder numberOfEpisodes(int numberOfEpisodes); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder seasonNumber(String seasonNumber); + @NotNull Builder seasonNumber(int seasonNumber); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + protected RadioSeason(Person actor, Person director, java.util.Date endDate, HasPart episode, int numberOfEpisodes, IsPartOf partOfSeries, Organization productionCompany, StringOrInt 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, int 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); } } diff --git a/src/main/java/org/schema/RadioSeries.java b/src/main/java/org/schema/RadioSeries.java index 7a1392ee..cfed41ad 100644 --- a/src/main/java/org/schema/RadioSeries.java +++ b/src/main/java/org/schema/RadioSeries.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * CreativeWorkSeries dedicated to radio broadcast and associated online delivery. */ @@ -49,13 +53,13 @@ public MusicGroupOrPerson getMusicBy() { /** * The number of episodes in this season or series. */ - public Integer getNumberOfEpisodes() { + public int getNumberOfEpisodes() { return myNumberOfEpisodes; } /** * The number of seasons in this series. */ - public Integer getNumberOfSeasons() { + public int getNumberOfSeasons() { return myNumberOfSeasons; } /** @@ -79,7 +83,7 @@ public VideoObject getTrailer() { /** * Builder for {@link RadioSeries} */ - public static final class RadioSeriesThingBuilder implements Builder { + static final class RadioSeriesThingBuilder implements Builder { /** * Creates new {@link RadioSeries} instance. */ @@ -89,40 +93,40 @@ public RadioSeries build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * An episode of a tv, radio or game media within a series or season. */ - public Builder episode(HasPart hasPart) { + @NotNull public Builder episode(HasPart hasPart) { this.episode = hasPart; return this; } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -130,13 +134,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -144,194 +148,194 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The number of episodes in this season or series. */ - public Builder numberOfEpisodes(Integer integer) { - this.numberOfEpisodes = integer; + @NotNull public Builder numberOfEpisodes(int numberOfEpisodes) { + this.numberOfEpisodes = numberOfEpisodes; return this; } /** * The number of seasons in this series. */ - public Builder numberOfSeasons(Integer integer) { - this.numberOfSeasons = integer; + @NotNull public Builder numberOfSeasons(int numberOfSeasons) { + this.numberOfSeasons = numberOfSeasons; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * A season that is part of the media series. */ - public Builder containsSeason(HasPart hasPart) { + @NotNull public Builder containsSeason(HasPart hasPart) { this.containsSeason = hasPart; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -339,13 +343,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -353,20 +357,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -374,13 +378,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -388,40 +392,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -429,13 +433,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -443,13 +447,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -457,13 +461,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -471,21 +475,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -493,7 +497,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -501,7 +505,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -509,7 +513,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -517,7 +521,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -525,13 +529,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -539,101 +543,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -641,13 +645,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -655,35 +659,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -691,13 +695,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -705,53 +709,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -759,13 +763,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -773,127 +777,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -901,7 +905,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -909,7 +913,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -917,7 +921,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -925,20 +929,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -946,13 +950,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -960,66 +964,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1027,13 +1031,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1041,40 +1045,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1108,7 +1112,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1143,7 +1147,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1176,7 +1180,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1184,38 +1188,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1226,8 +1230,8 @@ public Builder id(long id) { private Person director; private HasPart episode; private MusicGroupOrPerson musicBy; - private Integer numberOfEpisodes; - private Integer numberOfSeasons; + private int numberOfEpisodes; + private int numberOfSeasons; private Organization productionCompany; private HasPart containsSeason; private VideoObject trailer; @@ -1289,7 +1293,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1307,162 +1311,162 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder episode(HasPart hasPart); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder numberOfEpisodes(Integer integer); - Builder numberOfSeasons(Integer integer); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder containsSeason(HasPart hasPart); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder endDate(java.util.Date date); - Builder startDate(java.util.Date date); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder episode(HasPart hasPart); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder numberOfEpisodes(int numberOfEpisodes); + @NotNull Builder numberOfSeasons(int numberOfSeasons); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder containsSeason(HasPart hasPart); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected RadioSeries(Person actor, Person director, HasPart episode, MusicGroupOrPerson musicBy, Integer numberOfEpisodes, Integer numberOfSeasons, Organization productionCompany, HasPart containsSeason, VideoObject trailer, 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) { + protected RadioSeries(Person actor, Person director, HasPart episode, MusicGroupOrPerson musicBy, int numberOfEpisodes, int numberOfSeasons, Organization productionCompany, HasPart containsSeason, VideoObject trailer, 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, int 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); myActor = actor; myDirector = director; @@ -1478,8 +1482,8 @@ protected RadioSeries(Person actor, Person director, HasPart episode, MusicGroup private Person myDirector; private HasPart myEpisode; private MusicGroupOrPerson myMusicBy; - private Integer myNumberOfEpisodes; - private Integer myNumberOfSeasons; + private int myNumberOfEpisodes; + private int myNumberOfSeasons; private Organization myProductionCompany; private HasPart myContainsSeason; private VideoObject myTrailer; diff --git a/src/main/java/org/schema/RadioStation.java b/src/main/java/org/schema/RadioStation.java index 2809e692..59d3a8d4 100644 --- a/src/main/java/org/schema/RadioStation.java +++ b/src/main/java/org/schema/RadioStation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A radio station. */ @@ -25,7 +29,7 @@ public class RadioStation extends LocalBusiness { /** * Builder for {@link RadioStation} */ - public static final class RadioStationThingBuilder implements Builder { + static final class RadioStationThingBuilder implements Builder { /** * Creates new {@link RadioStation} instance. */ @@ -35,107 +39,107 @@ public RadioStation build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Radiograpy.java b/src/main/java/org/schema/Radiograpy.java index 79e7a8ea..d66de66c 100644 --- a/src/main/java/org/schema/Radiograpy.java +++ b/src/main/java/org/schema/Radiograpy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Radiography. */ @@ -25,7 +29,7 @@ public class Radiograpy { /** * Builder for {@link Radiograpy} */ - public static final class RadiograpyThingBuilder implements Builder { + static final class RadiograpyThingBuilder implements Builder { /** * Creates new {@link Radiograpy} instance. */ @@ -34,7 +38,7 @@ public Radiograpy build() { } } public interface Builder extends ThingBuilder { - + } protected Radiograpy() { diff --git a/src/main/java/org/schema/RandomizedTrial.java b/src/main/java/org/schema/RandomizedTrial.java index 8d6a6af4..c23fe6ae 100644 --- a/src/main/java/org/schema/RandomizedTrial.java +++ b/src/main/java/org/schema/RandomizedTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A randomized trial design. */ @@ -25,7 +29,7 @@ public class RandomizedTrial { /** * Builder for {@link RandomizedTrial} */ - public static final class RandomizedTrialThingBuilder implements Builder { + static final class RandomizedTrialThingBuilder implements Builder { /** * Creates new {@link RandomizedTrial} instance. */ @@ -34,7 +38,7 @@ public RandomizedTrial build() { } } public interface Builder extends ThingBuilder { - + } protected RandomizedTrial() { diff --git a/src/main/java/org/schema/Rating.java b/src/main/java/org/schema/Rating.java index 1643fe34..a7531908 100644 --- a/src/main/java/org/schema/Rating.java +++ b/src/main/java/org/schema/Rating.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A rating is an evaluation on a numeric scale, such as 1 to 5 stars. */ @@ -43,7 +47,7 @@ public NumberOrString getWorstRating() { /** * Builder for {@link Rating} */ - public static final class RatingThingBuilder implements Builder { + static final class RatingThingBuilder implements Builder { /** * Creates new {@link Rating} instance. */ @@ -53,7 +57,7 @@ public Rating build() { /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ - public Builder bestRating(Number number) { + @NotNull public Builder bestRating(Number number) { if (this.bestRating == null) this.bestRating = new NumberOrString(); this.bestRating.setNumber(number); return this; @@ -61,7 +65,7 @@ public Builder bestRating(Number number) { /** * The highest value allowed in this rating system. If bestRating is omitted, 5 is assumed. */ - public Builder bestRating(String bestRating) { + @NotNull public Builder bestRating(String bestRating) { if (this.bestRating == null) this.bestRating = new NumberOrString(); this.bestRating.setString(bestRating); return this; @@ -69,14 +73,14 @@ public Builder bestRating(String bestRating) { /** * The rating for the content. */ - public Builder ratingValue(String ratingValue) { + @NotNull public Builder ratingValue(String ratingValue) { this.ratingValue = ratingValue; return this; } /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ - public Builder worstRating(Number number) { + @NotNull public Builder worstRating(Number number) { if (this.worstRating == null) this.worstRating = new NumberOrString(); this.worstRating.setNumber(number); return this; @@ -84,7 +88,7 @@ public Builder worstRating(Number number) { /** * The lowest value allowed in this rating system. If worstRating is omitted, 1 is assumed. */ - public Builder worstRating(String worstRating) { + @NotNull public Builder worstRating(String worstRating) { if (this.worstRating == null) this.worstRating = new NumberOrString(); this.worstRating.setString(worstRating); return this; @@ -92,21 +96,21 @@ public Builder worstRating(String worstRating) { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -140,7 +144,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -175,7 +179,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -208,7 +212,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -216,38 +220,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -268,23 +272,23 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder bestRating(Number number); - Builder bestRating(String bestRating); - Builder ratingValue(String ratingValue); - Builder worstRating(Number number); - Builder worstRating(String worstRating); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder bestRating(Number number); + @NotNull Builder bestRating(String bestRating); + @NotNull Builder ratingValue(String ratingValue); + @NotNull Builder worstRating(Number number); + @NotNull Builder worstRating(String worstRating); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/ReactAction.java b/src/main/java/org/schema/ReactAction.java index 4fafaee7..133c98dd 100644 --- a/src/main/java/org/schema/ReactAction.java +++ b/src/main/java/org/schema/ReactAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of responding instinctively and emotionally to an object, expressing a sentiment. */ @@ -25,7 +29,7 @@ public class ReactAction extends AssessAction { /** * Builder for {@link ReactAction} */ - public static final class ReactActionThingBuilder implements Builder { + static final class ReactActionThingBuilder implements Builder { /** * Creates new {@link ReactAction} instance. */ @@ -35,7 +39,7 @@ public ReactAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ReadAction.java b/src/main/java/org/schema/ReadAction.java index 1ad3e34e..f04cf22c 100644 --- a/src/main/java/org/schema/ReadAction.java +++ b/src/main/java/org/schema/ReadAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of consuming written content. */ @@ -25,7 +29,7 @@ public class ReadAction extends ConsumeAction { /** * Builder for {@link ReadAction} */ - public static final class ReadActionThingBuilder implements Builder { + static final class ReadActionThingBuilder implements Builder { /** * Creates new {@link ReadAction} instance. */ @@ -35,20 +39,20 @@ public ReadAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RealEstateAgent.java b/src/main/java/org/schema/RealEstateAgent.java index 51e026b3..6f277a3b 100644 --- a/src/main/java/org/schema/RealEstateAgent.java +++ b/src/main/java/org/schema/RealEstateAgent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A real-estate agent. */ @@ -25,7 +29,7 @@ public class RealEstateAgent extends LocalBusiness { /** * Builder for {@link RealEstateAgent} */ - public static final class RealEstateAgentThingBuilder implements Builder { + static final class RealEstateAgentThingBuilder implements Builder { /** * Creates new {@link RealEstateAgent} instance. */ @@ -35,107 +39,107 @@ public RealEstateAgent build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RearWheelDriveConfiguration.java b/src/main/java/org/schema/RearWheelDriveConfiguration.java index 88649e50..3e7ad5ec 100644 --- a/src/main/java/org/schema/RearWheelDriveConfiguration.java +++ b/src/main/java/org/schema/RearWheelDriveConfiguration.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Real-wheel drive is a transmission layout where the engine drives the rear wheels. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class RearWheelDriveConfiguration { /** * Builder for {@link RearWheelDriveConfiguration} */ - public static final class RearWheelDriveConfigurationThingBuilder implements Builder { + static final class RearWheelDriveConfigurationThingBuilder implements Builder { /** * Creates new {@link RearWheelDriveConfiguration} instance. */ @@ -35,7 +39,7 @@ public RearWheelDriveConfiguration build() { } } public interface Builder extends ThingBuilder { - + } protected RearWheelDriveConfiguration() { diff --git a/src/main/java/org/schema/ReceiveAction.java b/src/main/java/org/schema/ReceiveAction.java index e3c31cd1..3a0e6177 100644 --- a/src/main/java/org/schema/ReceiveAction.java +++ b/src/main/java/org/schema/ReceiveAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of physically/electronically taking delivery of an object thathas been transferred from an origin to a destination. Reciprocal of SendAction.

Related actions:

  • SendAction: The reciprocal of ReceiveAction.
  • TakeAction: Unlike TakeAction, ReceiveAction does not imply that the ownership has been transfered (e.g. I can receive a package, but it does not mean the package is now mine)
. */ @@ -37,7 +41,7 @@ public AudienceOrOrganizationOrPerson getSender() { /** * Builder for {@link ReceiveAction} */ - public static final class ReceiveActionThingBuilder implements Builder { + static final class ReceiveActionThingBuilder implements Builder { /** * Creates new {@link ReceiveAction} instance. */ @@ -47,20 +51,20 @@ public ReceiveAction build() { /** * A sub property of instrument. The method of delivery. */ - public Builder deliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder deliveryMethod(DeliveryMethod deliveryMethod) { this.deliveryMethod = deliveryMethod; return this; } /** * A sub property of instrument. The method of delivery. */ - public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.deliveryMethod(deliveryMethod.build()); } /** * A sub property of participant. The participant who is at the sending end of the action. */ - public Builder sender(Audience audience) { + @NotNull public Builder sender(Audience audience) { if (this.sender == null) this.sender = new AudienceOrOrganizationOrPerson(); this.sender.setAudience(audience); return this; @@ -68,13 +72,13 @@ public Builder sender(Audience audience) { /** * A sub property of participant. The participant who is at the sending end of the action. */ - public Builder sender(Audience.Builder audience) { + @NotNull public Builder sender(Audience.Builder audience) { return this.sender(audience.build()); } /** * A sub property of participant. The participant who is at the sending end of the action. */ - public Builder sender(Organization organization) { + @NotNull public Builder sender(Organization organization) { if (this.sender == null) this.sender = new AudienceOrOrganizationOrPerson(); this.sender.setOrganization(organization); return this; @@ -82,13 +86,13 @@ public Builder sender(Organization organization) { /** * A sub property of participant. The participant who is at the sending end of the action. */ - public Builder sender(Organization.Builder organization) { + @NotNull public Builder sender(Organization.Builder organization) { return this.sender(organization.build()); } /** * A sub property of participant. The participant who is at the sending end of the action. */ - public Builder sender(Person person) { + @NotNull public Builder sender(Person person) { if (this.sender == null) this.sender = new AudienceOrOrganizationOrPerson(); this.sender.setPerson(person); return this; @@ -96,39 +100,39 @@ public Builder sender(Person person) { /** * A sub property of participant. The participant who is at the sending end of the action. */ - public Builder sender(Person.Builder person) { + @NotNull public Builder sender(Person.Builder person) { return this.sender(person.build()); } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -136,13 +140,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -150,7 +154,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -158,7 +162,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -167,67 +171,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -261,7 +265,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -296,7 +300,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -329,7 +333,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -337,38 +341,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -396,42 +400,42 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder deliveryMethod(DeliveryMethod deliveryMethod); - Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder sender(Audience audience); - Builder sender(Audience.Builder audience); - Builder sender(Organization organization); - Builder sender(Organization.Builder organization); - Builder sender(Person person); - Builder sender(Person.Builder person); - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder deliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder sender(Audience audience); + @NotNull Builder sender(Audience.Builder audience); + @NotNull Builder sender(Organization organization); + @NotNull Builder sender(Organization.Builder organization); + @NotNull Builder sender(Person person); + @NotNull Builder sender(Person.Builder person); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ReceiveAction(DeliveryMethod deliveryMethod, AudienceOrOrganizationOrPerson sender, 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) { diff --git a/src/main/java/org/schema/Recipe.java b/src/main/java/org/schema/Recipe.java index c137dbd8..92113094 100644 --- a/src/main/java/org/schema/Recipe.java +++ b/src/main/java/org/schema/Recipe.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A recipe. */ @@ -85,7 +89,7 @@ public Duration getTotalTime() { /** * Builder for {@link Recipe} */ - public static final class RecipeThingBuilder implements Builder { + static final class RecipeThingBuilder implements Builder { /** * Creates new {@link Recipe} instance. */ @@ -95,74 +99,74 @@ public Recipe build() { /** * The method of cooking, such as Frying, Steaming, ... */ - public Builder cookingMethod(String cookingMethod) { + @NotNull public Builder cookingMethod(String cookingMethod) { this.cookingMethod = cookingMethod; return this; } /** * The time it takes to actually cook the dish, in ISO 8601 duration format. */ - public Builder cookTime(Duration duration) { + @NotNull public Builder cookTime(Duration duration) { this.cookTime = duration; return this; } /** * The time it takes to actually cook the dish, in ISO 8601 duration format. */ - public Builder cookTime(Duration.Builder duration) { + @NotNull public Builder cookTime(Duration.Builder duration) { return this.cookTime(duration.build()); } /** * A single ingredient used in the recipe, e.g. sugar, flour or garlic. */ - public Builder recipeIngredient(String recipeIngredient) { + @NotNull public Builder recipeIngredient(String recipeIngredient) { this.recipeIngredient = recipeIngredient; return this; } /** * Nutrition information about the recipe. */ - public Builder nutrition(NutritionInformation nutritionInformation) { + @NotNull public Builder nutrition(NutritionInformation nutritionInformation) { this.nutrition = nutritionInformation; return this; } /** * Nutrition information about the recipe. */ - public Builder nutrition(NutritionInformation.Builder nutritionInformation) { + @NotNull public Builder nutrition(NutritionInformation.Builder nutritionInformation) { return this.nutrition(nutritionInformation.build()); } /** * The length of time it takes to prepare the recipe, in ISO 8601 duration format. */ - public Builder prepTime(Duration duration) { + @NotNull public Builder prepTime(Duration duration) { this.prepTime = duration; return this; } /** * The length of time it takes to prepare the recipe, in ISO 8601 duration format. */ - public Builder prepTime(Duration.Builder duration) { + @NotNull public Builder prepTime(Duration.Builder duration) { return this.prepTime(duration.build()); } /** * The category of the recipe—for example, appetizer, entree, etc. */ - public Builder recipeCategory(String recipeCategory) { + @NotNull public Builder recipeCategory(String recipeCategory) { this.recipeCategory = recipeCategory; return this; } /** * The cuisine of the recipe (for example, French or Ethiopian). */ - public Builder recipeCuisine(String recipeCuisine) { + @NotNull public Builder recipeCuisine(String recipeCuisine) { this.recipeCuisine = recipeCuisine; return this; } /** * A step or instruction involved in making the recipe. */ - public Builder recipeInstructions(ItemList itemList) { + @NotNull public Builder recipeInstructions(ItemList itemList) { if (this.recipeInstructions == null) this.recipeInstructions = new ItemListOrString(); this.recipeInstructions.setItemList(itemList); return this; @@ -170,13 +174,13 @@ public Builder recipeInstructions(ItemList itemList) { /** * A step or instruction involved in making the recipe. */ - public Builder recipeInstructions(ItemList.Builder itemList) { + @NotNull public Builder recipeInstructions(ItemList.Builder itemList) { return this.recipeInstructions(itemList.build()); } /** * A step or instruction involved in making the recipe. */ - public Builder recipeInstructions(String recipeInstructions) { + @NotNull public Builder recipeInstructions(String recipeInstructions) { if (this.recipeInstructions == null) this.recipeInstructions = new ItemListOrString(); this.recipeInstructions.setString(recipeInstructions); return this; @@ -184,147 +188,147 @@ public Builder recipeInstructions(String recipeInstructions) { /** * The quantity produced by the recipe (for example, number of people served, number of servings, etc). */ - public Builder recipeYield(String recipeYield) { + @NotNull public Builder recipeYield(String recipeYield) { this.recipeYield = recipeYield; return this; } /** * The total time it takes to prepare and cook the recipe, in ISO 8601 duration format. */ - public Builder totalTime(Duration duration) { + @NotNull public Builder totalTime(Duration duration) { this.totalTime = duration; return this; } /** * The total time it takes to prepare and cook the recipe, in ISO 8601 duration format. */ - public Builder totalTime(Duration.Builder duration) { + @NotNull public Builder totalTime(Duration.Builder duration) { return this.totalTime(duration.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -332,13 +336,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -346,20 +350,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -367,13 +371,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -381,40 +385,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -422,13 +426,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -436,13 +440,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -450,13 +454,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -464,21 +468,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -486,7 +490,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -494,7 +498,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -502,7 +506,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -510,7 +514,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -518,13 +522,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -532,101 +536,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -634,13 +638,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -648,35 +652,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -684,13 +688,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -698,53 +702,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -752,13 +756,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -766,127 +770,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -894,7 +898,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -902,7 +906,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -910,7 +914,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -918,20 +922,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -939,13 +943,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -953,66 +957,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1020,13 +1024,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1034,40 +1038,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1101,7 +1105,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1136,7 +1140,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1169,7 +1173,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1177,38 +1181,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1281,7 +1285,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1299,160 +1303,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder cookingMethod(String cookingMethod); - Builder cookTime(Duration duration); - Builder cookTime(Duration.Builder duration); - Builder recipeIngredient(String recipeIngredient); - Builder nutrition(NutritionInformation nutritionInformation); - Builder nutrition(NutritionInformation.Builder nutritionInformation); - Builder prepTime(Duration duration); - Builder prepTime(Duration.Builder duration); - Builder recipeCategory(String recipeCategory); - Builder recipeCuisine(String recipeCuisine); - Builder recipeInstructions(ItemList itemList); - Builder recipeInstructions(ItemList.Builder itemList); - Builder recipeInstructions(String recipeInstructions); - Builder recipeYield(String recipeYield); - Builder totalTime(Duration duration); - Builder totalTime(Duration.Builder duration); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder cookingMethod(String cookingMethod); + @NotNull Builder cookTime(Duration duration); + @NotNull Builder cookTime(Duration.Builder duration); + @NotNull Builder recipeIngredient(String recipeIngredient); + @NotNull Builder nutrition(NutritionInformation nutritionInformation); + @NotNull Builder nutrition(NutritionInformation.Builder nutritionInformation); + @NotNull Builder prepTime(Duration duration); + @NotNull Builder prepTime(Duration.Builder duration); + @NotNull Builder recipeCategory(String recipeCategory); + @NotNull Builder recipeCuisine(String recipeCuisine); + @NotNull Builder recipeInstructions(ItemList itemList); + @NotNull Builder recipeInstructions(ItemList.Builder itemList); + @NotNull Builder recipeInstructions(String recipeInstructions); + @NotNull Builder recipeYield(String recipeYield); + @NotNull Builder totalTime(Duration duration); + @NotNull Builder totalTime(Duration.Builder duration); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Recipe(String cookingMethod, Duration cookTime, String recipeIngredient, NutritionInformation nutrition, Duration prepTime, String recipeCategory, String recipeCuisine, ItemListOrString recipeInstructions, String recipeYield, Duration totalTime, 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) { + protected Recipe(String cookingMethod, Duration cookTime, String recipeIngredient, NutritionInformation nutrition, Duration prepTime, String recipeCategory, String recipeCuisine, ItemListOrString recipeInstructions, String recipeYield, Duration totalTime, 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, int 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); myCookingMethod = cookingMethod; myCookTime = cookTime; diff --git a/src/main/java/org/schema/RecommendedDoseSchedule.java b/src/main/java/org/schema/RecommendedDoseSchedule.java index f1aebf19..6e945aef 100644 --- a/src/main/java/org/schema/RecommendedDoseSchedule.java +++ b/src/main/java/org/schema/RecommendedDoseSchedule.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A recommended dosing schedule for a drug or supplement as prescribed or recommended by an authority or by the drug/supplement's manufacturer. Capture the recommending authority in the recognizingAuthority property of MedicalEntity. */ @@ -25,7 +29,7 @@ public class RecommendedDoseSchedule extends DoseSchedule { /** * Builder for {@link RecommendedDoseSchedule} */ - public static final class RecommendedDoseScheduleThingBuilder implements Builder { + static final class RecommendedDoseScheduleThingBuilder implements Builder { /** * Creates new {@link RecommendedDoseSchedule} instance. */ @@ -35,22 +39,22 @@ public RecommendedDoseSchedule build() { /** * The unit of the dose, e.g. 'mg'. */ - public Builder doseUnit(String doseUnit) { + @NotNull public Builder doseUnit(String doseUnit) { this.doseUnit = doseUnit; return this; } /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Integer integer) { + @NotNull public Builder doseValue(int doseValue) { if (this.doseValue == null) this.doseValue = new Number(); - this.doseValue.setInteger(integer); + this.doseValue.setInt(doseValue); return this; } /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Long doseValue) { + @NotNull public Builder doseValue(long doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setLong(doseValue); return this; @@ -58,7 +62,7 @@ public Builder doseValue(Long doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Float doseValue) { + @NotNull public Builder doseValue(float doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setFloat(doseValue); return this; @@ -66,7 +70,7 @@ public Builder doseValue(Float doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Double doseValue) { + @NotNull public Builder doseValue(double doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setDouble(doseValue); return this; @@ -74,7 +78,7 @@ public Builder doseValue(Double doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(String doseValue) { + @NotNull public Builder doseValue(String doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setString(doseValue); return this; @@ -82,113 +86,113 @@ public Builder doseValue(String doseValue) { /** * How often the dose is taken, e.g. 'daily'. */ - public Builder frequency(String frequency) { + @NotNull public Builder frequency(String frequency) { this.frequency = frequency; return this; } /** * Characteristics of the population for which this is intended, or which typically uses it, e.g. 'adults'. */ - public Builder targetPopulation(String targetPopulation) { + @NotNull public Builder targetPopulation(String targetPopulation) { this.targetPopulation = targetPopulation; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -222,7 +226,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -257,7 +261,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -290,7 +294,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -298,38 +302,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -357,38 +361,38 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder doseUnit(String doseUnit); - Builder doseValue(Integer integer); - Builder doseValue(Long doseValue); - Builder doseValue(Float doseValue); - Builder doseValue(Double doseValue); - Builder doseValue(String doseValue); - Builder frequency(String frequency); - Builder targetPopulation(String targetPopulation); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder doseUnit(String doseUnit); + @NotNull Builder doseValue(int doseValue); + @NotNull Builder doseValue(long doseValue); + @NotNull Builder doseValue(float doseValue); + @NotNull Builder doseValue(double doseValue); + @NotNull Builder doseValue(String doseValue); + @NotNull Builder frequency(String frequency); + @NotNull Builder targetPopulation(String targetPopulation); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Recruiting.java b/src/main/java/org/schema/Recruiting.java index 47883828..e1ffa416 100644 --- a/src/main/java/org/schema/Recruiting.java +++ b/src/main/java/org/schema/Recruiting.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Recruiting participants. */ @@ -25,7 +29,7 @@ public class Recruiting { /** * Builder for {@link Recruiting} */ - public static final class RecruitingThingBuilder implements Builder { + static final class RecruitingThingBuilder implements Builder { /** * Creates new {@link Recruiting} instance. */ @@ -34,7 +38,7 @@ public Recruiting build() { } } public interface Builder extends ThingBuilder { - + } protected Recruiting() { diff --git a/src/main/java/org/schema/RecyclingCenter.java b/src/main/java/org/schema/RecyclingCenter.java index c4b493ed..4164746f 100644 --- a/src/main/java/org/schema/RecyclingCenter.java +++ b/src/main/java/org/schema/RecyclingCenter.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A recycling center. */ @@ -25,7 +29,7 @@ public class RecyclingCenter extends LocalBusiness { /** * Builder for {@link RecyclingCenter} */ - public static final class RecyclingCenterThingBuilder implements Builder { + static final class RecyclingCenterThingBuilder implements Builder { /** * Creates new {@link RecyclingCenter} instance. */ @@ -35,107 +39,107 @@ public RecyclingCenter build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RefurbishedCondition.java b/src/main/java/org/schema/RefurbishedCondition.java index 7d8be09b..0cfb66a4 100644 --- a/src/main/java/org/schema/RefurbishedCondition.java +++ b/src/main/java/org/schema/RefurbishedCondition.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is refurbished. */ @@ -25,7 +29,7 @@ public class RefurbishedCondition { /** * Builder for {@link RefurbishedCondition} */ - public static final class RefurbishedConditionThingBuilder implements Builder { + static final class RefurbishedConditionThingBuilder implements Builder { /** * Creates new {@link RefurbishedCondition} instance. */ @@ -34,7 +38,7 @@ public RefurbishedCondition build() { } } public interface Builder extends ThingBuilder { - + } protected RefurbishedCondition() { diff --git a/src/main/java/org/schema/RegisterAction.java b/src/main/java/org/schema/RegisterAction.java index 208cf86c..ece2d852 100644 --- a/src/main/java/org/schema/RegisterAction.java +++ b/src/main/java/org/schema/RegisterAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of registering to be a user of a service, product or web page.

Related actions:

  • JoinAction: Unlike JoinAction, RegisterAction implies you are registering to be a user of a service, *not* a group/team of people.
  • FollowAction: Unlike FollowAction, RegisterAction doesn't imply that the agent is expecting to poll for updates from the object.
  • SubscribeAction: Unlike SubscribeAction, RegisterAction doesn't imply that the agent is expecting updates from the object
. */ @@ -25,7 +29,7 @@ public class RegisterAction extends InteractAction { /** * Builder for {@link RegisterAction} */ - public static final class RegisterActionThingBuilder implements Builder { + static final class RegisterActionThingBuilder implements Builder { /** * Creates new {@link RegisterAction} instance. */ @@ -35,7 +39,7 @@ public RegisterAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Registry.java b/src/main/java/org/schema/Registry.java index 347f98e8..80ca6de9 100644 --- a/src/main/java/org/schema/Registry.java +++ b/src/main/java/org/schema/Registry.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A registry-based study design. */ @@ -25,7 +29,7 @@ public class Registry { /** * Builder for {@link Registry} */ - public static final class RegistryThingBuilder implements Builder { + static final class RegistryThingBuilder implements Builder { /** * Creates new {@link Registry} instance. */ @@ -34,7 +38,7 @@ public Registry build() { } } public interface Builder extends ThingBuilder { - + } protected Registry() { diff --git a/src/main/java/org/schema/ReimbursementCap.java b/src/main/java/org/schema/ReimbursementCap.java index 6eb6a24e..40e982a8 100644 --- a/src/main/java/org/schema/ReimbursementCap.java +++ b/src/main/java/org/schema/ReimbursementCap.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The drug's cost represents the maximum reimbursement paid by an insurer for the drug. */ @@ -25,7 +29,7 @@ public class ReimbursementCap { /** * Builder for {@link ReimbursementCap} */ - public static final class ReimbursementCapThingBuilder implements Builder { + static final class ReimbursementCapThingBuilder implements Builder { /** * Creates new {@link ReimbursementCap} instance. */ @@ -34,7 +38,7 @@ public ReimbursementCap build() { } } public interface Builder extends ThingBuilder { - + } protected ReimbursementCap() { diff --git a/src/main/java/org/schema/RejectAction.java b/src/main/java/org/schema/RejectAction.java index dadc9255..6db9055a 100644 --- a/src/main/java/org/schema/RejectAction.java +++ b/src/main/java/org/schema/RejectAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of rejecting to/adopting an object.

Related actions:

. */ @@ -25,7 +29,7 @@ public class RejectAction extends AllocateAction { /** * Builder for {@link RejectAction} */ - public static final class RejectActionThingBuilder implements Builder { + static final class RejectActionThingBuilder implements Builder { /** * Creates new {@link RejectAction} instance. */ @@ -35,7 +39,7 @@ public RejectAction build() { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setMedicalDevicePurpose(medicalDevicePurpose); return this; @@ -43,13 +47,13 @@ public Builder purpose(MedicalDevicePurpose medicalDevicePurpose) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { + @NotNull public Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose) { return this.purpose(medicalDevicePurpose.build()); } /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing thing) { + @NotNull public Builder purpose(Thing thing) { if (this.purpose == null) this.purpose = new MedicalDevicePurposeOrThing(); this.purpose.setThing(thing); return this; @@ -57,13 +61,13 @@ public Builder purpose(Thing thing) { /** * A goal towards an action is taken. Can be concrete or abstract. */ - public Builder purpose(Thing.Builder thing) { + @NotNull public Builder purpose(Thing.Builder thing) { return this.purpose(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -71,13 +75,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -85,7 +89,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -93,7 +97,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -102,67 +106,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -196,7 +200,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -231,7 +235,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -264,7 +268,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -272,38 +276,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -328,34 +332,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder purpose(MedicalDevicePurpose medicalDevicePurpose); - Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); - Builder purpose(Thing thing); - Builder purpose(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder purpose(MedicalDevicePurpose medicalDevicePurpose); + @NotNull Builder purpose(MedicalDevicePurpose.Builder medicalDevicePurpose); + @NotNull Builder purpose(Thing thing); + @NotNull Builder purpose(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RemixAlbum.java b/src/main/java/org/schema/RemixAlbum.java index b54239ec..cfc50ff7 100644 --- a/src/main/java/org/schema/RemixAlbum.java +++ b/src/main/java/org/schema/RemixAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * RemixAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class RemixAlbum { /** * Builder for {@link RemixAlbum} */ - public static final class RemixAlbumThingBuilder implements Builder { + static final class RemixAlbumThingBuilder implements Builder { /** * Creates new {@link RemixAlbum} instance. */ @@ -35,7 +39,7 @@ public RemixAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected RemixAlbum() { diff --git a/src/main/java/org/schema/Renal.java b/src/main/java/org/schema/Renal.java index 2413bc7f..30c5ea54 100644 --- a/src/main/java/org/schema/Renal.java +++ b/src/main/java/org/schema/Renal.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to the study of the kidneys and its respective disease states. */ @@ -25,7 +29,7 @@ public class Renal { /** * Builder for {@link Renal} */ - public static final class RenalThingBuilder implements Builder { + static final class RenalThingBuilder implements Builder { /** * Creates new {@link Renal} instance. */ @@ -34,7 +38,7 @@ public Renal build() { } } public interface Builder extends ThingBuilder { - + } protected Renal() { diff --git a/src/main/java/org/schema/RentAction.java b/src/main/java/org/schema/RentAction.java index 726b78da..5bb093fa 100644 --- a/src/main/java/org/schema/RentAction.java +++ b/src/main/java/org/schema/RentAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of giving money in return for temporary use, but not ownership, of an object such as a vehicle or property. For example, an agent rents a property from a landlord in exchange for a periodic payment. */ @@ -37,7 +41,7 @@ public RealEstateAgent getRealEstateAgent() { /** * Builder for {@link RentAction} */ - public static final class RentActionThingBuilder implements Builder { + static final class RentActionThingBuilder implements Builder { /** * Creates new {@link RentAction} instance. */ @@ -47,7 +51,7 @@ public RentAction build() { /** * A sub property of participant. The owner of the real estate property. */ - public Builder landlord(Organization organization) { + @NotNull public Builder landlord(Organization organization) { if (this.landlord == null) this.landlord = new OrganizationOrPerson(); this.landlord.setOrganization(organization); return this; @@ -55,13 +59,13 @@ public Builder landlord(Organization organization) { /** * A sub property of participant. The owner of the real estate property. */ - public Builder landlord(Organization.Builder organization) { + @NotNull public Builder landlord(Organization.Builder organization) { return this.landlord(organization.build()); } /** * A sub property of participant. The owner of the real estate property. */ - public Builder landlord(Person person) { + @NotNull public Builder landlord(Person person) { if (this.landlord == null) this.landlord = new OrganizationOrPerson(); this.landlord.setPerson(person); return this; @@ -69,20 +73,20 @@ public Builder landlord(Person person) { /** * A sub property of participant. The owner of the real estate property. */ - public Builder landlord(Person.Builder person) { + @NotNull public Builder landlord(Person.Builder person) { return this.landlord(person.build()); } /** * A sub property of participant. The real estate agent involved in the action. */ - public Builder realEstateAgent(RealEstateAgent realEstateAgent) { + @NotNull public Builder realEstateAgent(RealEstateAgent realEstateAgent) { this.realEstateAgent = realEstateAgent; return this; } /** * A sub property of participant. The real estate agent involved in the action. */ - public Builder realEstateAgent(RealEstateAgent.Builder realEstateAgent) { + @NotNull public Builder realEstateAgent(RealEstateAgent.Builder realEstateAgent) { return this.realEstateAgent(realEstateAgent.build()); } /** @@ -108,7 +112,7 @@ public Builder realEstateAgent(RealEstateAgent.Builder realEstateAgent) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -136,7 +140,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -144,20 +148,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -165,13 +169,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -179,7 +183,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -187,7 +191,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -196,67 +200,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -290,7 +294,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -325,7 +329,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -358,7 +362,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -366,38 +370,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -425,40 +429,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder landlord(Organization organization); - Builder landlord(Organization.Builder organization); - Builder landlord(Person person); - Builder landlord(Person.Builder person); - Builder realEstateAgent(RealEstateAgent realEstateAgent); - Builder realEstateAgent(RealEstateAgent.Builder realEstateAgent); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder landlord(Organization organization); + @NotNull Builder landlord(Organization.Builder organization); + @NotNull Builder landlord(Person person); + @NotNull Builder landlord(Person.Builder person); + @NotNull Builder realEstateAgent(RealEstateAgent realEstateAgent); + @NotNull Builder realEstateAgent(RealEstateAgent.Builder realEstateAgent); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/RentalCarReservation.java b/src/main/java/org/schema/RentalCarReservation.java index 8decf101..1002204c 100644 --- a/src/main/java/org/schema/RentalCarReservation.java +++ b/src/main/java/org/schema/RentalCarReservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservation for a rental car.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. */ @@ -37,21 +41,21 @@ public Place getDropoffLocation() { /** * When a taxi will pickup a passenger or a rental car can be picked up. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getPickupTime() { return myPickupTime; } /** * When a rental car can be dropped off. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDropoffTime() { return myDropoffTime; } /** * Builder for {@link RentalCarReservation} */ - public static final class RentalCarReservationThingBuilder implements Builder { + static final class RentalCarReservationThingBuilder implements Builder { /** * Creates new {@link RentalCarReservation} instance. */ @@ -61,80 +65,80 @@ public RentalCarReservation build() { /** * Where a taxi will pick up a passenger or a rental car can be picked up. */ - public Builder pickupLocation(Place place) { + @NotNull public Builder pickupLocation(Place place) { this.pickupLocation = place; return this; } /** * Where a taxi will pick up a passenger or a rental car can be picked up. */ - public Builder pickupLocation(Place.Builder place) { + @NotNull public Builder pickupLocation(Place.Builder place) { return this.pickupLocation(place.build()); } /** * Where a rental car can be dropped off. */ - public Builder dropoffLocation(Place place) { + @NotNull public Builder dropoffLocation(Place place) { this.dropoffLocation = place; return this; } /** * Where a rental car can be dropped off. */ - public Builder dropoffLocation(Place.Builder place) { + @NotNull public Builder dropoffLocation(Place.Builder place) { return this.dropoffLocation(place.build()); } /** * When a taxi will pickup a passenger or a rental car can be picked up. */ - public Builder pickupTime(java.util.Date date) { + @NotNull public Builder pickupTime(java.util.Date date) { this.pickupTime = date; return this; } /** * When a rental car can be dropped off. */ - public Builder dropoffTime(java.util.Date date) { + @NotNull public Builder dropoffTime(java.util.Date date) { this.dropoffTime = date; return this; } /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -142,13 +146,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -156,13 +160,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -170,13 +174,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -184,53 +188,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -238,7 +242,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -246,13 +250,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -260,14 +264,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -275,13 +279,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -289,27 +293,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,52 +488,52 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder pickupLocation(Place place); - Builder pickupLocation(Place.Builder place); - Builder dropoffLocation(Place place); - Builder dropoffLocation(Place.Builder place); - Builder pickupTime(java.util.Date date); - Builder dropoffTime(java.util.Date date); - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder pickupLocation(Place place); + @NotNull Builder pickupLocation(Place.Builder place); + @NotNull Builder dropoffLocation(Place place); + @NotNull Builder dropoffLocation(Place.Builder place); + @NotNull Builder pickupTime(java.util.Date date); + @NotNull Builder dropoffTime(java.util.Date date); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/RentalVehicleUsage.java b/src/main/java/org/schema/RentalVehicleUsage.java index a5d7952d..c8d517f0 100644 --- a/src/main/java/org/schema/RentalVehicleUsage.java +++ b/src/main/java/org/schema/RentalVehicleUsage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates the usage of the vehicle as a rental car. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class RentalVehicleUsage { /** * Builder for {@link RentalVehicleUsage} */ - public static final class RentalVehicleUsageThingBuilder implements Builder { + static final class RentalVehicleUsageThingBuilder implements Builder { /** * Creates new {@link RentalVehicleUsage} instance. */ @@ -35,7 +39,7 @@ public RentalVehicleUsage build() { } } public interface Builder extends ThingBuilder { - + } protected RentalVehicleUsage() { diff --git a/src/main/java/org/schema/ReplaceAction.java b/src/main/java/org/schema/ReplaceAction.java index 7f919bb4..e0064e66 100644 --- a/src/main/java/org/schema/ReplaceAction.java +++ b/src/main/java/org/schema/ReplaceAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of editing a recipient by replacing an old object with a new object. */ @@ -37,7 +41,7 @@ public Thing getReplacer() { /** * Builder for {@link ReplaceAction} */ - public static final class ReplaceActionThingBuilder implements Builder { + static final class ReplaceActionThingBuilder implements Builder { /** * Creates new {@link ReplaceAction} instance. */ @@ -47,46 +51,46 @@ public ReplaceAction build() { /** * A sub property of object. The object that is being replaced. */ - public Builder replacee(Thing thing) { + @NotNull public Builder replacee(Thing thing) { this.replacee = thing; return this; } /** * A sub property of object. The object that is being replaced. */ - public Builder replacee(Thing.Builder thing) { + @NotNull public Builder replacee(Thing.Builder thing) { return this.replacee(thing.build()); } /** * A sub property of object. The object that replaces. */ - public Builder replacer(Thing thing) { + @NotNull public Builder replacer(Thing thing) { this.replacer = thing; return this; } /** * A sub property of object. The object that replaces. */ - public Builder replacer(Thing.Builder thing) { + @NotNull public Builder replacer(Thing.Builder thing) { return this.replacer(thing.build()); } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing thing) { + @NotNull public Builder targetCollection(Thing thing) { this.targetCollection = thing; return this; } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing.Builder thing) { + @NotNull public Builder targetCollection(Thing.Builder thing) { return this.targetCollection(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -94,13 +98,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -108,7 +112,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -116,7 +120,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -125,67 +129,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -219,7 +223,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -254,7 +258,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -287,7 +291,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -295,38 +299,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -353,36 +357,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder replacee(Thing thing); - Builder replacee(Thing.Builder thing); - Builder replacer(Thing thing); - Builder replacer(Thing.Builder thing); - Builder targetCollection(Thing thing); - Builder targetCollection(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder replacee(Thing thing); + @NotNull Builder replacee(Thing.Builder thing); + @NotNull Builder replacer(Thing thing); + @NotNull Builder replacer(Thing.Builder thing); + @NotNull Builder targetCollection(Thing thing); + @NotNull Builder targetCollection(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ReplaceAction(Thing replacee, Thing replacer, 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) { diff --git a/src/main/java/org/schema/ReplyAction.java b/src/main/java/org/schema/ReplyAction.java index 72563059..a79b3731 100644 --- a/src/main/java/org/schema/ReplyAction.java +++ b/src/main/java/org/schema/ReplyAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of responding to a question/message asked/sent by the object. Related to AskAction.

Related actions:

  • AskAction: Appears generally as an origin of a ReplyAction
. */ @@ -31,7 +35,7 @@ public Comment getResultComment() { /** * Builder for {@link ReplyAction} */ - public static final class ReplyActionThingBuilder implements Builder { + static final class ReplyActionThingBuilder implements Builder { /** * Creates new {@link ReplyAction} instance. */ @@ -41,33 +45,33 @@ public ReplyAction build() { /** * A sub property of result. The Comment created or sent as a result of this action. */ - public Builder resultComment(Comment comment) { + @NotNull public Builder resultComment(Comment comment) { this.resultComment = comment; return this; } /** * A sub property of result. The Comment created or sent as a result of this action. */ - public Builder resultComment(Comment.Builder comment) { + @NotNull public Builder resultComment(Comment.Builder comment) { return this.resultComment(comment.build()); } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -75,13 +79,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -89,7 +93,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -97,13 +101,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -111,13 +115,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -125,13 +129,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -139,13 +143,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -153,7 +157,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -161,7 +165,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -170,67 +174,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -264,7 +268,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -299,7 +303,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -332,7 +336,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -340,38 +344,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -399,43 +403,43 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder resultComment(Comment comment); - Builder resultComment(Comment.Builder comment); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder resultComment(Comment comment); + @NotNull Builder resultComment(Comment.Builder comment); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ReplyAction(Comment resultComment, 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) { diff --git a/src/main/java/org/schema/ReportedDoseSchedule.java b/src/main/java/org/schema/ReportedDoseSchedule.java index c9149724..fca8d3e6 100644 --- a/src/main/java/org/schema/ReportedDoseSchedule.java +++ b/src/main/java/org/schema/ReportedDoseSchedule.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A patient-reported or observed dosing schedule for a drug or supplement. */ @@ -25,7 +29,7 @@ public class ReportedDoseSchedule extends DoseSchedule { /** * Builder for {@link ReportedDoseSchedule} */ - public static final class ReportedDoseScheduleThingBuilder implements Builder { + static final class ReportedDoseScheduleThingBuilder implements Builder { /** * Creates new {@link ReportedDoseSchedule} instance. */ @@ -35,22 +39,22 @@ public ReportedDoseSchedule build() { /** * The unit of the dose, e.g. 'mg'. */ - public Builder doseUnit(String doseUnit) { + @NotNull public Builder doseUnit(String doseUnit) { this.doseUnit = doseUnit; return this; } /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Integer integer) { + @NotNull public Builder doseValue(int doseValue) { if (this.doseValue == null) this.doseValue = new Number(); - this.doseValue.setInteger(integer); + this.doseValue.setInt(doseValue); return this; } /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Long doseValue) { + @NotNull public Builder doseValue(long doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setLong(doseValue); return this; @@ -58,7 +62,7 @@ public Builder doseValue(Long doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Float doseValue) { + @NotNull public Builder doseValue(float doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setFloat(doseValue); return this; @@ -66,7 +70,7 @@ public Builder doseValue(Float doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(Double doseValue) { + @NotNull public Builder doseValue(double doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setDouble(doseValue); return this; @@ -74,7 +78,7 @@ public Builder doseValue(Double doseValue) { /** * The value of the dose, e.g. 500. */ - public Builder doseValue(String doseValue) { + @NotNull public Builder doseValue(String doseValue) { if (this.doseValue == null) this.doseValue = new Number(); this.doseValue.setString(doseValue); return this; @@ -82,113 +86,113 @@ public Builder doseValue(String doseValue) { /** * How often the dose is taken, e.g. 'daily'. */ - public Builder frequency(String frequency) { + @NotNull public Builder frequency(String frequency) { this.frequency = frequency; return this; } /** * Characteristics of the population for which this is intended, or which typically uses it, e.g. 'adults'. */ - public Builder targetPopulation(String targetPopulation) { + @NotNull public Builder targetPopulation(String targetPopulation) { this.targetPopulation = targetPopulation; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -222,7 +226,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -257,7 +261,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -290,7 +294,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -298,38 +302,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -357,38 +361,38 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder doseUnit(String doseUnit); - Builder doseValue(Integer integer); - Builder doseValue(Long doseValue); - Builder doseValue(Float doseValue); - Builder doseValue(Double doseValue); - Builder doseValue(String doseValue); - Builder frequency(String frequency); - Builder targetPopulation(String targetPopulation); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder doseUnit(String doseUnit); + @NotNull Builder doseValue(int doseValue); + @NotNull Builder doseValue(long doseValue); + @NotNull Builder doseValue(float doseValue); + @NotNull Builder doseValue(double doseValue); + @NotNull Builder doseValue(String doseValue); + @NotNull Builder frequency(String frequency); + @NotNull Builder targetPopulation(String targetPopulation); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Researcher.java b/src/main/java/org/schema/Researcher.java index cd2c5f41..6ae5c896 100644 --- a/src/main/java/org/schema/Researcher.java +++ b/src/main/java/org/schema/Researcher.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Researchers. */ @@ -25,7 +29,7 @@ public class Researcher { /** * Builder for {@link Researcher} */ - public static final class ResearcherThingBuilder implements Builder { + static final class ResearcherThingBuilder implements Builder { /** * Creates new {@link Researcher} instance. */ @@ -34,7 +38,7 @@ public Researcher build() { } } public interface Builder extends ThingBuilder { - + } protected Researcher() { diff --git a/src/main/java/org/schema/Reservation.java b/src/main/java/org/schema/Reservation.java index 6219d787..8bca2def 100644 --- a/src/main/java/org/schema/Reservation.java +++ b/src/main/java/org/schema/Reservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Describes a reservation for travel, dining or an event. Some reservations require tickets.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, restaurant reservations, flights, or rental cars, use http://schema.org/Offer. */ @@ -55,14 +59,14 @@ public OrganizationOrPerson getProvider() { /** * The date and time the reservation was booked. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getBookingTime() { return myBookingTime; } /** * The date and time the reservation was modified. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getModifiedTime() { return myModifiedTime; } @@ -99,7 +103,7 @@ public OrganizationOrPerson getBroker() { /** * Builder for {@link Reservation} */ - public static final class ReservationThingBuilder implements Builder { + static final class ReservationThingBuilder implements Builder { /** * Creates new {@link Reservation} instance. */ @@ -109,40 +113,40 @@ public Reservation build() { /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -150,13 +154,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -164,13 +168,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -178,13 +182,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -192,53 +196,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -246,7 +250,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -254,13 +258,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -268,14 +272,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -283,13 +287,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -297,27 +301,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -351,7 +355,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -386,7 +390,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -419,7 +423,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -427,38 +431,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -488,46 +492,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/ReservationCancelled.java b/src/main/java/org/schema/ReservationCancelled.java index f9c40946..d596162b 100644 --- a/src/main/java/org/schema/ReservationCancelled.java +++ b/src/main/java/org/schema/ReservationCancelled.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The status for a previously confirmed reservation that is now cancelled. */ @@ -25,7 +29,7 @@ public class ReservationCancelled { /** * Builder for {@link ReservationCancelled} */ - public static final class ReservationCancelledThingBuilder implements Builder { + static final class ReservationCancelledThingBuilder implements Builder { /** * Creates new {@link ReservationCancelled} instance. */ @@ -34,7 +38,7 @@ public ReservationCancelled build() { } } public interface Builder extends ThingBuilder { - + } protected ReservationCancelled() { diff --git a/src/main/java/org/schema/ReservationConfirmed.java b/src/main/java/org/schema/ReservationConfirmed.java index df75415a..7bcdd9be 100644 --- a/src/main/java/org/schema/ReservationConfirmed.java +++ b/src/main/java/org/schema/ReservationConfirmed.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The status of a confirmed reservation. */ @@ -25,7 +29,7 @@ public class ReservationConfirmed { /** * Builder for {@link ReservationConfirmed} */ - public static final class ReservationConfirmedThingBuilder implements Builder { + static final class ReservationConfirmedThingBuilder implements Builder { /** * Creates new {@link ReservationConfirmed} instance. */ @@ -34,7 +38,7 @@ public ReservationConfirmed build() { } } public interface Builder extends ThingBuilder { - + } protected ReservationConfirmed() { diff --git a/src/main/java/org/schema/ReservationHold.java b/src/main/java/org/schema/ReservationHold.java index dc67c3f6..9e387c20 100644 --- a/src/main/java/org/schema/ReservationHold.java +++ b/src/main/java/org/schema/ReservationHold.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The status of a reservation on hold pending an update like credit card number or flight changes. */ @@ -25,7 +29,7 @@ public class ReservationHold { /** * Builder for {@link ReservationHold} */ - public static final class ReservationHoldThingBuilder implements Builder { + static final class ReservationHoldThingBuilder implements Builder { /** * Creates new {@link ReservationHold} instance. */ @@ -34,7 +38,7 @@ public ReservationHold build() { } } public interface Builder extends ThingBuilder { - + } protected ReservationHold() { diff --git a/src/main/java/org/schema/ReservationPackage.java b/src/main/java/org/schema/ReservationPackage.java index af04977d..8d9b3b8a 100644 --- a/src/main/java/org/schema/ReservationPackage.java +++ b/src/main/java/org/schema/ReservationPackage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A group of multiple reservations with common values for all sub-reservations. */ @@ -31,7 +35,7 @@ public Reservation getSubReservation() { /** * Builder for {@link ReservationPackage} */ - public static final class ReservationPackageThingBuilder implements Builder { + static final class ReservationPackageThingBuilder implements Builder { /** * Creates new {@link ReservationPackage} instance. */ @@ -41,53 +45,53 @@ public ReservationPackage build() { /** * The individual reservations included in the package. Typically a repeated property. */ - public Builder subReservation(Reservation reservation) { + @NotNull public Builder subReservation(Reservation reservation) { this.subReservation = reservation; return this; } /** * The individual reservations included in the package. Typically a repeated property. */ - public Builder subReservation(Reservation.Builder reservation) { + @NotNull public Builder subReservation(Reservation.Builder reservation) { return this.subReservation(reservation.build()); } /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -95,13 +99,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -109,13 +113,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -123,13 +127,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -137,53 +141,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -191,7 +195,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -199,13 +203,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -213,14 +217,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -228,13 +232,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -242,27 +246,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -296,7 +300,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -331,7 +335,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -364,7 +368,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -372,38 +376,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -434,48 +438,48 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder subReservation(Reservation reservation); - Builder subReservation(Reservation.Builder reservation); - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder subReservation(Reservation reservation); + @NotNull Builder subReservation(Reservation.Builder reservation); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/ReservationPending.java b/src/main/java/org/schema/ReservationPending.java index 281438a7..681ef39b 100644 --- a/src/main/java/org/schema/ReservationPending.java +++ b/src/main/java/org/schema/ReservationPending.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The status of a reservation when a request has been sent, but not confirmed. */ @@ -25,7 +29,7 @@ public class ReservationPending { /** * Builder for {@link ReservationPending} */ - public static final class ReservationPendingThingBuilder implements Builder { + static final class ReservationPendingThingBuilder implements Builder { /** * Creates new {@link ReservationPending} instance. */ @@ -34,7 +38,7 @@ public ReservationPending build() { } } public interface Builder extends ThingBuilder { - + } protected ReservationPending() { diff --git a/src/main/java/org/schema/ReservationStatusType.java b/src/main/java/org/schema/ReservationStatusType.java index 30d8f83f..fb134502 100644 --- a/src/main/java/org/schema/ReservationStatusType.java +++ b/src/main/java/org/schema/ReservationStatusType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Enumerated status values for Reservation. */ @@ -25,7 +29,7 @@ public class ReservationStatusType extends Enumeration { /** * Builder for {@link ReservationStatusType} */ - public static final class ReservationStatusTypeThingBuilder implements Builder { + static final class ReservationStatusTypeThingBuilder implements Builder { /** * Creates new {@link ReservationStatusType} instance. */ @@ -35,7 +39,7 @@ public ReservationStatusType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ReservationStatusType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ReserveAction.java b/src/main/java/org/schema/ReserveAction.java index c56422da..d338c6c0 100644 --- a/src/main/java/org/schema/ReserveAction.java +++ b/src/main/java/org/schema/ReserveAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Reserving a concrete object.

Related actions:

  • ScheduleAction: Unlike ScheduleAction, ReserveAction reserves concrete objects (e.g. a table, a hotel) towards a time slot / spatial allocation
. */ @@ -25,7 +29,7 @@ public class ReserveAction extends PlanAction { /** * Builder for {@link ReserveAction} */ - public static final class ReserveActionThingBuilder implements Builder { + static final class ReserveActionThingBuilder implements Builder { /** * Creates new {@link ReserveAction} instance. */ @@ -35,14 +39,14 @@ public ReserveAction build() { /** * The time the object is scheduled to. */ - public Builder scheduledTime(java.util.Date date) { + @NotNull public Builder scheduledTime(java.util.Date date) { this.scheduledTime = date; return this; } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -50,13 +54,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -64,7 +68,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -72,7 +76,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -81,67 +85,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -175,7 +179,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -210,7 +214,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -243,7 +247,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -251,38 +255,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -307,31 +311,31 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder scheduledTime(java.util.Date date); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder scheduledTime(java.util.Date date); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Reservoir.java b/src/main/java/org/schema/Reservoir.java index adf9d97a..cc3d6709 100644 --- a/src/main/java/org/schema/Reservoir.java +++ b/src/main/java/org/schema/Reservoir.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservoir of water, typically an artificially created lake, like the Lake Kariba reservoir. */ @@ -25,7 +29,7 @@ public class Reservoir extends BodyOfWater { /** * Builder for {@link Reservoir} */ - public static final class ReservoirThingBuilder implements Builder { + static final class ReservoirThingBuilder implements Builder { /** * Creates new {@link Reservoir} instance. */ @@ -35,66 +39,66 @@ public Reservoir build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Residence.java b/src/main/java/org/schema/Residence.java index 247f688e..2143062d 100644 --- a/src/main/java/org/schema/Residence.java +++ b/src/main/java/org/schema/Residence.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The place where a person lives. */ @@ -25,7 +29,7 @@ public class Residence extends Place { /** * Builder for {@link Residence} */ - public static final class ResidenceThingBuilder implements Builder { + static final class ResidenceThingBuilder implements Builder { /** * Creates new {@link Residence} instance. */ @@ -35,66 +39,66 @@ public Residence build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RespiratoryTherapy.java b/src/main/java/org/schema/RespiratoryTherapy.java index a5d017d3..09caff92 100644 --- a/src/main/java/org/schema/RespiratoryTherapy.java +++ b/src/main/java/org/schema/RespiratoryTherapy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Respiratory therapy. */ @@ -25,7 +29,7 @@ public class RespiratoryTherapy { /** * Builder for {@link RespiratoryTherapy} */ - public static final class RespiratoryTherapyThingBuilder implements Builder { + static final class RespiratoryTherapyThingBuilder implements Builder { /** * Creates new {@link RespiratoryTherapy} instance. */ @@ -34,7 +38,7 @@ public RespiratoryTherapy build() { } } public interface Builder extends ThingBuilder { - + } protected RespiratoryTherapy() { diff --git a/src/main/java/org/schema/Restaurant.java b/src/main/java/org/schema/Restaurant.java index 6b2b34a8..d3e789c5 100644 --- a/src/main/java/org/schema/Restaurant.java +++ b/src/main/java/org/schema/Restaurant.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A restaurant. */ @@ -25,7 +29,7 @@ public class Restaurant extends FoodEstablishment { /** * Builder for {@link Restaurant} */ - public static final class RestaurantThingBuilder implements Builder { + static final class RestaurantThingBuilder implements Builder { /** * Creates new {@link Restaurant} instance. */ @@ -35,7 +39,7 @@ public Restaurant build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -43,7 +47,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -51,121 +55,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -527,60 +531,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Result.java b/src/main/java/org/schema/Result.java index 01989373..7cf9de46 100644 --- a/src/main/java/org/schema/Result.java +++ b/src/main/java/org/schema/Result.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** */ public interface Result { diff --git a/src/main/java/org/schema/ResultsAvailable.java b/src/main/java/org/schema/ResultsAvailable.java index b74a0379..a6f9f3d4 100644 --- a/src/main/java/org/schema/ResultsAvailable.java +++ b/src/main/java/org/schema/ResultsAvailable.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Results are available. */ @@ -25,7 +29,7 @@ public class ResultsAvailable { /** * Builder for {@link ResultsAvailable} */ - public static final class ResultsAvailableThingBuilder implements Builder { + static final class ResultsAvailableThingBuilder implements Builder { /** * Creates new {@link ResultsAvailable} instance. */ @@ -34,7 +38,7 @@ public ResultsAvailable build() { } } public interface Builder extends ThingBuilder { - + } protected ResultsAvailable() { diff --git a/src/main/java/org/schema/ResultsNotAvailable.java b/src/main/java/org/schema/ResultsNotAvailable.java index df6f89a8..0a8a1822 100644 --- a/src/main/java/org/schema/ResultsNotAvailable.java +++ b/src/main/java/org/schema/ResultsNotAvailable.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Results are not available. */ @@ -25,7 +29,7 @@ public class ResultsNotAvailable { /** * Builder for {@link ResultsNotAvailable} */ - public static final class ResultsNotAvailableThingBuilder implements Builder { + static final class ResultsNotAvailableThingBuilder implements Builder { /** * Creates new {@link ResultsNotAvailable} instance. */ @@ -34,7 +38,7 @@ public ResultsNotAvailable build() { } } public interface Builder extends ThingBuilder { - + } protected ResultsNotAvailable() { diff --git a/src/main/java/org/schema/ResumeAction.java b/src/main/java/org/schema/ResumeAction.java index a12991f7..51c4fc27 100644 --- a/src/main/java/org/schema/ResumeAction.java +++ b/src/main/java/org/schema/ResumeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of resuming a device or application which was formerly paused (e.g. resume music playback or resume a timer). */ @@ -25,7 +29,7 @@ public class ResumeAction extends ControlAction { /** * Builder for {@link ResumeAction} */ - public static final class ResumeActionThingBuilder implements Builder { + static final class ResumeActionThingBuilder implements Builder { /** * Creates new {@link ResumeAction} instance. */ @@ -35,7 +39,7 @@ public ResumeAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Retail.java b/src/main/java/org/schema/Retail.java index 4b8ff592..d03576ef 100644 --- a/src/main/java/org/schema/Retail.java +++ b/src/main/java/org/schema/Retail.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The drug's cost represents the retail cost of the drug. */ @@ -25,7 +29,7 @@ public class Retail { /** * Builder for {@link Retail} */ - public static final class RetailThingBuilder implements Builder { + static final class RetailThingBuilder implements Builder { /** * Creates new {@link Retail} instance. */ @@ -34,7 +38,7 @@ public Retail build() { } } public interface Builder extends ThingBuilder { - + } protected Retail() { diff --git a/src/main/java/org/schema/ReturnAction.java b/src/main/java/org/schema/ReturnAction.java index 801fc87c..a108e94e 100644 --- a/src/main/java/org/schema/ReturnAction.java +++ b/src/main/java/org/schema/ReturnAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of returning to the origin that which was previously received (concrete objects) or taken (ownership). */ @@ -31,7 +35,7 @@ public AudienceOrOrganizationOrPerson getRecipient() { /** * Builder for {@link ReturnAction} */ - public static final class ReturnActionThingBuilder implements Builder { + static final class ReturnActionThingBuilder implements Builder { /** * Creates new {@link ReturnAction} instance. */ @@ -41,7 +45,7 @@ public ReturnAction build() { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -49,13 +53,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -63,13 +67,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -77,39 +81,39 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -117,13 +121,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -131,7 +135,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -139,7 +143,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -148,67 +152,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -242,7 +246,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -277,7 +281,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -310,7 +314,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -318,38 +322,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -376,40 +380,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ReturnAction(AudienceOrOrganizationOrPerson recipient, 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) { diff --git a/src/main/java/org/schema/Review.java b/src/main/java/org/schema/Review.java index 1472e378..b628d73d 100644 --- a/src/main/java/org/schema/Review.java +++ b/src/main/java/org/schema/Review.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A review of an item - for example, of a restaurant, movie, or store. */ @@ -43,7 +47,7 @@ public Rating getReviewRating() { /** * Builder for {@link Review} */ - public static final class ReviewThingBuilder implements Builder { + static final class ReviewThingBuilder implements Builder { /** * Creates new {@link Review} instance. */ @@ -53,160 +57,160 @@ public Review build() { /** * The item that is being reviewed/rated. */ - public Builder itemReviewed(Thing thing) { + @NotNull public Builder itemReviewed(Thing thing) { this.itemReviewed = thing; return this; } /** * The item that is being reviewed/rated. */ - public Builder itemReviewed(Thing.Builder thing) { + @NotNull public Builder itemReviewed(Thing.Builder thing) { return this.itemReviewed(thing.build()); } /** * The actual body of the review. */ - public Builder reviewBody(String reviewBody) { + @NotNull public Builder reviewBody(String reviewBody) { this.reviewBody = reviewBody; return this; } /** * The rating given in this review. Note that reviews can themselves be rated. The reviewRating applies to rating given by the review. The aggregateRating property applies to the review itself, as a creative work. */ - public Builder reviewRating(Rating rating) { + @NotNull public Builder reviewRating(Rating rating) { this.reviewRating = rating; return this; } /** * The rating given in this review. Note that reviews can themselves be rated. The reviewRating applies to rating given by the review. The aggregateRating property applies to the review itself, as a creative work. */ - public Builder reviewRating(Rating.Builder rating) { + @NotNull public Builder reviewRating(Rating.Builder rating) { return this.reviewRating(rating.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -214,13 +218,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -228,20 +232,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -249,13 +253,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -263,40 +267,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -304,13 +308,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -318,13 +322,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -332,13 +336,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -346,21 +350,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -368,7 +372,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -376,7 +380,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -384,7 +388,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -392,7 +396,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -400,13 +404,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -414,101 +418,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -516,13 +520,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -530,35 +534,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -566,13 +570,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -580,53 +584,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -634,13 +638,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -648,127 +652,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -776,7 +780,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -784,7 +788,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -792,7 +796,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -800,20 +804,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -821,13 +825,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -835,66 +839,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -902,13 +906,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -916,40 +920,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -983,7 +987,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1018,7 +1022,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1051,7 +1055,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1059,38 +1063,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1156,7 +1160,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1174,149 +1178,149 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder itemReviewed(Thing thing); - Builder itemReviewed(Thing.Builder thing); - Builder reviewBody(String reviewBody); - Builder reviewRating(Rating rating); - Builder reviewRating(Rating.Builder rating); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder itemReviewed(Thing thing); + @NotNull Builder itemReviewed(Thing.Builder thing); + @NotNull Builder reviewBody(String reviewBody); + @NotNull Builder reviewRating(Rating rating); + @NotNull Builder reviewRating(Rating.Builder rating); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected Review(Thing itemReviewed, String reviewBody, Rating reviewRating, 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) { + protected Review(Thing itemReviewed, String reviewBody, Rating reviewRating, 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, int 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); myItemReviewed = itemReviewed; myReviewBody = reviewBody; diff --git a/src/main/java/org/schema/ReviewAction.java b/src/main/java/org/schema/ReviewAction.java index 49ce81b1..caac34df 100644 --- a/src/main/java/org/schema/ReviewAction.java +++ b/src/main/java/org/schema/ReviewAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of producing a balanced opinion about the object for an audience. An agent reviews an object with participants resulting in a review. */ @@ -31,7 +35,7 @@ public Review getResultReview() { /** * Builder for {@link ReviewAction} */ - public static final class ReviewActionThingBuilder implements Builder { + static final class ReviewActionThingBuilder implements Builder { /** * Creates new {@link ReviewAction} instance. */ @@ -41,20 +45,20 @@ public ReviewAction build() { /** * A sub property of result. The review that resulted in the performing of the action. */ - public Builder resultReview(Review review) { + @NotNull public Builder resultReview(Review review) { this.resultReview = review; return this; } /** * A sub property of result. The review that resulted in the performing of the action. */ - public Builder resultReview(Review.Builder review) { + @NotNull public Builder resultReview(Review.Builder review) { return this.resultReview(review.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -62,13 +66,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -76,7 +80,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -84,7 +88,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -93,67 +97,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -187,7 +191,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -222,7 +226,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -263,38 +267,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -319,32 +323,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder resultReview(Review review); - Builder resultReview(Review.Builder review); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder resultReview(Review review); + @NotNull Builder resultReview(Review.Builder review); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ReviewAction(Review resultReview, 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) { diff --git a/src/main/java/org/schema/Rheumatologic.java b/src/main/java/org/schema/Rheumatologic.java index 66bfa071..29540dda 100644 --- a/src/main/java/org/schema/Rheumatologic.java +++ b/src/main/java/org/schema/Rheumatologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that deals with the study and treatment of rheumatic, autoimmune or joint diseases. */ @@ -25,7 +29,7 @@ public class Rheumatologic { /** * Builder for {@link Rheumatologic} */ - public static final class RheumatologicThingBuilder implements Builder { + static final class RheumatologicThingBuilder implements Builder { /** * Creates new {@link Rheumatologic} instance. */ @@ -34,7 +38,7 @@ public Rheumatologic build() { } } public interface Builder extends ThingBuilder { - + } protected Rheumatologic() { diff --git a/src/main/java/org/schema/RightHandDriving.java b/src/main/java/org/schema/RightHandDriving.java index b34c645e..9f84ad3c 100644 --- a/src/main/java/org/schema/RightHandDriving.java +++ b/src/main/java/org/schema/RightHandDriving.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The steering position is on the right side of the vehicle (viewed from the main direction of driving). * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class RightHandDriving { /** * Builder for {@link RightHandDriving} */ - public static final class RightHandDrivingThingBuilder implements Builder { + static final class RightHandDrivingThingBuilder implements Builder { /** * Creates new {@link RightHandDriving} instance. */ @@ -35,7 +39,7 @@ public RightHandDriving build() { } } public interface Builder extends ThingBuilder { - + } protected RightHandDriving() { diff --git a/src/main/java/org/schema/RiverBodyOfWater.java b/src/main/java/org/schema/RiverBodyOfWater.java index 8ada6169..1fd029a7 100644 --- a/src/main/java/org/schema/RiverBodyOfWater.java +++ b/src/main/java/org/schema/RiverBodyOfWater.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A river (for example, the broad majestic Shannon). */ @@ -25,7 +29,7 @@ public class RiverBodyOfWater extends BodyOfWater { /** * Builder for {@link RiverBodyOfWater} */ - public static final class RiverBodyOfWaterThingBuilder implements Builder { + static final class RiverBodyOfWaterThingBuilder implements Builder { /** * Creates new {@link RiverBodyOfWater} instance. */ @@ -35,66 +39,66 @@ public RiverBodyOfWater build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Role.java b/src/main/java/org/schema/Role.java index be88daa8..c6eb8064 100644 --- a/src/main/java/org/schema/Role.java +++ b/src/main/java/org/schema/Role.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Represents additional information about a relationship or property. For example a Role can be used to say that a 'member' role linking some SportsTeam to a player occurred during a particular time period. Or that a Person's 'actor' role in a Movie was for some particular characterName. Such properties can be attached to a Role entity, which is then associated with the main entities using ordinary properties like 'member' or 'actor'. * @@ -27,7 +31,7 @@ public class Role extends Intangible { /** * The start date and time of the item (in ISO 8601 date format). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getStartDate() { return myStartDate; } @@ -40,7 +44,7 @@ public String getRoleName() { /** * Builder for {@link Role} */ - public static final class RoleThingBuilder implements Builder { + static final class RoleThingBuilder implements Builder { /** * Creates new {@link Role} instance. */ @@ -50,35 +54,35 @@ public Role build() { /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * A role played, performed or filled by a person or organization. For example, the team of creators for a comic book might fill the roles named 'inker', 'penciller', and 'letterer'; or an athlete in a SportsTeam might play in the position named 'Quarterback'. */ - public Builder roleName(String roleName) { + @NotNull public Builder roleName(String roleName) { this.roleName = roleName; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -112,7 +116,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -147,7 +151,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -180,7 +184,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -188,38 +192,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -239,20 +243,20 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder startDate(java.util.Date date); - Builder roleName(String roleName); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder roleName(String roleName); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Role(java.util.Date startDate, String roleName, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/RoofingContractor.java b/src/main/java/org/schema/RoofingContractor.java index 229bbe61..8c59cf77 100644 --- a/src/main/java/org/schema/RoofingContractor.java +++ b/src/main/java/org/schema/RoofingContractor.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A roofing contractor. */ @@ -25,7 +29,7 @@ public class RoofingContractor extends ProfessionalService { /** * Builder for {@link RoofingContractor} */ - public static final class RoofingContractorThingBuilder implements Builder { + static final class RoofingContractorThingBuilder implements Builder { /** * Creates new {@link RoofingContractor} instance. */ @@ -35,107 +39,107 @@ public RoofingContractor build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/RsvpAction.java b/src/main/java/org/schema/RsvpAction.java index e80c0b80..fa5f40fb 100644 --- a/src/main/java/org/schema/RsvpAction.java +++ b/src/main/java/org/schema/RsvpAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of notifying an event organizer as to whether you expect to attend the event. */ @@ -43,7 +47,7 @@ public Comment getComment() { /** * Builder for {@link RsvpAction} */ - public static final class RsvpActionThingBuilder implements Builder { + static final class RsvpActionThingBuilder implements Builder { /** * Creates new {@link RsvpAction} instance. */ @@ -53,15 +57,15 @@ public RsvpAction build() { /** * If responding yes, the number of guests who will attend in addition to the invitee. */ - public Builder additionalNumberOfGuests(Integer integer) { + @NotNull public Builder additionalNumberOfGuests(int additionalNumberOfGuests) { if (this.additionalNumberOfGuests == null) this.additionalNumberOfGuests = new Number(); - this.additionalNumberOfGuests.setInteger(integer); + this.additionalNumberOfGuests.setInt(additionalNumberOfGuests); return this; } /** * If responding yes, the number of guests who will attend in addition to the invitee. */ - public Builder additionalNumberOfGuests(Long additionalNumberOfGuests) { + @NotNull public Builder additionalNumberOfGuests(long additionalNumberOfGuests) { if (this.additionalNumberOfGuests == null) this.additionalNumberOfGuests = new Number(); this.additionalNumberOfGuests.setLong(additionalNumberOfGuests); return this; @@ -69,7 +73,7 @@ public Builder additionalNumberOfGuests(Long additionalNumberOfGuests) { /** * If responding yes, the number of guests who will attend in addition to the invitee. */ - public Builder additionalNumberOfGuests(Float additionalNumberOfGuests) { + @NotNull public Builder additionalNumberOfGuests(float additionalNumberOfGuests) { if (this.additionalNumberOfGuests == null) this.additionalNumberOfGuests = new Number(); this.additionalNumberOfGuests.setFloat(additionalNumberOfGuests); return this; @@ -77,7 +81,7 @@ public Builder additionalNumberOfGuests(Float additionalNumberOfGuests) { /** * If responding yes, the number of guests who will attend in addition to the invitee. */ - public Builder additionalNumberOfGuests(Double additionalNumberOfGuests) { + @NotNull public Builder additionalNumberOfGuests(double additionalNumberOfGuests) { if (this.additionalNumberOfGuests == null) this.additionalNumberOfGuests = new Number(); this.additionalNumberOfGuests.setDouble(additionalNumberOfGuests); return this; @@ -85,7 +89,7 @@ public Builder additionalNumberOfGuests(Double additionalNumberOfGuests) { /** * If responding yes, the number of guests who will attend in addition to the invitee. */ - public Builder additionalNumberOfGuests(String additionalNumberOfGuests) { + @NotNull public Builder additionalNumberOfGuests(String additionalNumberOfGuests) { if (this.additionalNumberOfGuests == null) this.additionalNumberOfGuests = new Number(); this.additionalNumberOfGuests.setString(additionalNumberOfGuests); return this; @@ -93,59 +97,59 @@ public Builder additionalNumberOfGuests(String additionalNumberOfGuests) { /** * The response (yes, no, maybe) to the RSVP. */ - public Builder rsvpResponse(RsvpResponseType rsvpResponseType) { + @NotNull public Builder rsvpResponse(RsvpResponseType rsvpResponseType) { this.rsvpResponse = rsvpResponseType; return this; } /** * The response (yes, no, maybe) to the RSVP. */ - public Builder rsvpResponse(RsvpResponseType.Builder rsvpResponseType) { + @NotNull public Builder rsvpResponse(RsvpResponseType.Builder rsvpResponseType) { return this.rsvpResponse(rsvpResponseType.build()); } /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -153,13 +157,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -167,7 +171,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -175,13 +179,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -203,13 +207,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -217,13 +221,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -231,7 +235,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -239,7 +243,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -248,67 +252,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -342,7 +346,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -377,7 +381,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -410,7 +414,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -418,38 +422,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -480,52 +484,52 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalNumberOfGuests(Integer integer); - Builder additionalNumberOfGuests(Long additionalNumberOfGuests); - Builder additionalNumberOfGuests(Float additionalNumberOfGuests); - Builder additionalNumberOfGuests(Double additionalNumberOfGuests); - Builder additionalNumberOfGuests(String additionalNumberOfGuests); - Builder rsvpResponse(RsvpResponseType rsvpResponseType); - Builder rsvpResponse(RsvpResponseType.Builder rsvpResponseType); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder event(Event event); - Builder event(Event.Builder event); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalNumberOfGuests(int additionalNumberOfGuests); + @NotNull Builder additionalNumberOfGuests(long additionalNumberOfGuests); + @NotNull Builder additionalNumberOfGuests(float additionalNumberOfGuests); + @NotNull Builder additionalNumberOfGuests(double additionalNumberOfGuests); + @NotNull Builder additionalNumberOfGuests(String additionalNumberOfGuests); + @NotNull Builder rsvpResponse(RsvpResponseType rsvpResponseType); + @NotNull Builder rsvpResponse(RsvpResponseType.Builder rsvpResponseType); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected RsvpAction(Number additionalNumberOfGuests, RsvpResponseType rsvpResponse, Comment comment, 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) { diff --git a/src/main/java/org/schema/RsvpResponseMaybe.java b/src/main/java/org/schema/RsvpResponseMaybe.java index 60c29ffb..11bff012 100644 --- a/src/main/java/org/schema/RsvpResponseMaybe.java +++ b/src/main/java/org/schema/RsvpResponseMaybe.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The invitee may or may not attend. */ @@ -25,7 +29,7 @@ public class RsvpResponseMaybe { /** * Builder for {@link RsvpResponseMaybe} */ - public static final class RsvpResponseMaybeThingBuilder implements Builder { + static final class RsvpResponseMaybeThingBuilder implements Builder { /** * Creates new {@link RsvpResponseMaybe} instance. */ @@ -34,7 +38,7 @@ public RsvpResponseMaybe build() { } } public interface Builder extends ThingBuilder { - + } protected RsvpResponseMaybe() { diff --git a/src/main/java/org/schema/RsvpResponseNo.java b/src/main/java/org/schema/RsvpResponseNo.java index 9701927e..9dd615e5 100644 --- a/src/main/java/org/schema/RsvpResponseNo.java +++ b/src/main/java/org/schema/RsvpResponseNo.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The invitee will not attend. */ @@ -25,7 +29,7 @@ public class RsvpResponseNo { /** * Builder for {@link RsvpResponseNo} */ - public static final class RsvpResponseNoThingBuilder implements Builder { + static final class RsvpResponseNoThingBuilder implements Builder { /** * Creates new {@link RsvpResponseNo} instance. */ @@ -34,7 +38,7 @@ public RsvpResponseNo build() { } } public interface Builder extends ThingBuilder { - + } protected RsvpResponseNo() { diff --git a/src/main/java/org/schema/RsvpResponseType.java b/src/main/java/org/schema/RsvpResponseType.java index 632c681f..f89523ad 100644 --- a/src/main/java/org/schema/RsvpResponseType.java +++ b/src/main/java/org/schema/RsvpResponseType.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * RsvpResponseType is an enumeration type whose instances represent responding to an RSVP request. */ @@ -25,7 +29,7 @@ public class RsvpResponseType extends Enumeration { /** * Builder for {@link RsvpResponseType} */ - public static final class RsvpResponseTypeThingBuilder implements Builder { + static final class RsvpResponseTypeThingBuilder implements Builder { /** * Creates new {@link RsvpResponseType} instance. */ @@ -35,7 +39,7 @@ public RsvpResponseType build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected RsvpResponseType(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/RsvpResponseYes.java b/src/main/java/org/schema/RsvpResponseYes.java index 9b0e1209..673eed2c 100644 --- a/src/main/java/org/schema/RsvpResponseYes.java +++ b/src/main/java/org/schema/RsvpResponseYes.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The invitee will attend. */ @@ -25,7 +29,7 @@ public class RsvpResponseYes { /** * Builder for {@link RsvpResponseYes} */ - public static final class RsvpResponseYesThingBuilder implements Builder { + static final class RsvpResponseYesThingBuilder implements Builder { /** * Creates new {@link RsvpResponseYes} instance. */ @@ -34,7 +38,7 @@ public RsvpResponseYes build() { } } public interface Builder extends ThingBuilder { - + } protected RsvpResponseYes() { diff --git a/src/main/java/org/schema/SaleEvent.java b/src/main/java/org/schema/SaleEvent.java index fcc79c2a..074f702a 100644 --- a/src/main/java/org/schema/SaleEvent.java +++ b/src/main/java/org/schema/SaleEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Sales event. */ @@ -25,7 +29,7 @@ public class SaleEvent extends Event { /** * Builder for {@link SaleEvent} */ - public static final class SaleEventThingBuilder implements Builder { + static final class SaleEventThingBuilder implements Builder { /** * Creates new {@link SaleEvent} instance. */ @@ -35,20 +39,20 @@ public SaleEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ScheduleAction.java b/src/main/java/org/schema/ScheduleAction.java index 749675ce..2976eecc 100644 --- a/src/main/java/org/schema/ScheduleAction.java +++ b/src/main/java/org/schema/ScheduleAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Scheduling future actions, events, or tasks.

Related actions:

  • ReserveAction: Unlike ReserveAction, ScheduleAction allocates future actions (e.g. an event, a task, etc) towards a time slot / spatial allocation
. */ @@ -25,7 +29,7 @@ public class ScheduleAction extends PlanAction { /** * Builder for {@link ScheduleAction} */ - public static final class ScheduleActionThingBuilder implements Builder { + static final class ScheduleActionThingBuilder implements Builder { /** * Creates new {@link ScheduleAction} instance. */ @@ -35,14 +39,14 @@ public ScheduleAction build() { /** * The time the object is scheduled to. */ - public Builder scheduledTime(java.util.Date date) { + @NotNull public Builder scheduledTime(java.util.Date date) { this.scheduledTime = date; return this; } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -50,13 +54,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -64,7 +68,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -72,7 +76,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -81,67 +85,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -175,7 +179,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -210,7 +214,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -243,7 +247,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -251,38 +255,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -307,31 +311,31 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder scheduledTime(java.util.Date date); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder scheduledTime(java.util.Date date); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SchemaOrg.java b/src/main/java/org/schema/SchemaOrg.java index e8280d0b..90e271ab 100644 --- a/src/main/java/org/schema/SchemaOrg.java +++ b/src/main/java/org/schema/SchemaOrg.java @@ -1289,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. */ diff --git a/src/main/java/org/schema/ScholarlyArticle.java b/src/main/java/org/schema/ScholarlyArticle.java index dbcff2d5..fef7d510 100644 --- a/src/main/java/org/schema/ScholarlyArticle.java +++ b/src/main/java/org/schema/ScholarlyArticle.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A scholarly article. */ @@ -25,7 +29,7 @@ public class ScholarlyArticle extends Article { /** * Builder for {@link ScholarlyArticle} */ - public static final class ScholarlyArticleThingBuilder implements Builder { + static final class ScholarlyArticleThingBuilder implements Builder { /** * Creates new {@link ScholarlyArticle} instance. */ @@ -35,187 +39,187 @@ public ScholarlyArticle build() { /** * The actual body of the article. */ - public Builder articleBody(String articleBody) { + @NotNull public Builder articleBody(String articleBody) { this.articleBody = articleBody; return this; } /** * Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. */ - public Builder articleSection(String articleSection) { + @NotNull public Builder articleSection(String articleSection) { this.articleSection = articleSection; return this; } /** * The number of words in the text of the Article. */ - public Builder wordCount(Integer integer) { - this.wordCount = integer; + @NotNull public Builder wordCount(int wordCount) { + this.wordCount = wordCount; return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -223,13 +227,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -237,20 +241,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -258,13 +262,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -272,40 +276,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -313,13 +317,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -327,13 +331,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -341,13 +345,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -355,21 +359,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -377,7 +381,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -385,7 +389,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -393,7 +397,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -401,7 +405,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -409,13 +413,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -423,101 +427,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -525,13 +529,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -539,35 +543,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -575,13 +579,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -589,53 +593,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -643,13 +647,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -657,127 +661,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -785,7 +789,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -793,7 +797,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -801,7 +805,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -809,20 +813,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -830,13 +834,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -844,66 +848,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -911,13 +915,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -925,40 +929,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -992,7 +996,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1027,7 +1031,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1060,7 +1064,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1068,38 +1072,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1108,9 +1112,9 @@ public Builder id(long id) { } private String articleBody; private String articleSection; - private Integer wordCount; - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private int wordCount; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; private String schemaVersion; private Thing about; @@ -1168,7 +1172,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1186,152 +1190,152 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder articleBody(String articleBody); - Builder articleSection(String articleSection); - Builder wordCount(Integer integer); - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder articleBody(String articleBody); + @NotNull Builder articleSection(String articleSection); + @NotNull Builder wordCount(int wordCount); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + protected ScholarlyArticle(String articleBody, String articleSection, int wordCount, StringOrInt pageEnd, StringOrInt 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, int 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); } } diff --git a/src/main/java/org/schema/School.java b/src/main/java/org/schema/School.java index d9f177c0..246ac5e8 100644 --- a/src/main/java/org/schema/School.java +++ b/src/main/java/org/schema/School.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A school. */ @@ -25,7 +29,7 @@ public class School extends EducationalOrganization { /** * Builder for {@link School} */ - public static final class SchoolThingBuilder implements Builder { + static final class SchoolThingBuilder implements Builder { /** * Creates new {@link School} instance. */ @@ -35,53 +39,53 @@ public School build() { /** * Alumni of educational organization. */ - public Builder alumni(Person person) { + @NotNull public Builder alumni(Person person) { this.alumni = person; return this; } /** * Alumni of educational organization. */ - public Builder alumni(Person.Builder person) { + @NotNull public Builder alumni(Person.Builder person) { return this.alumni(person.build()); } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -89,13 +93,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -103,147 +107,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -251,13 +255,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -265,20 +269,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -286,13 +290,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -300,13 +304,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -314,13 +318,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -328,33 +332,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -362,13 +366,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -376,100 +380,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -503,7 +507,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -538,7 +542,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -571,7 +575,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -579,38 +583,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -661,80 +665,80 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder alumni(Person person); - Builder alumni(Person.Builder person); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder alumni(Person person); + @NotNull Builder alumni(Person.Builder person); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ScreeningEvent.java b/src/main/java/org/schema/ScreeningEvent.java index 127fde37..339c5c38 100644 --- a/src/main/java/org/schema/ScreeningEvent.java +++ b/src/main/java/org/schema/ScreeningEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A screening of a movie or other video. */ @@ -43,7 +47,7 @@ public Movie getWorkPresented() { /** * Builder for {@link ScreeningEvent} */ - public static final class ScreeningEventThingBuilder implements Builder { + static final class ScreeningEventThingBuilder implements Builder { /** * Creates new {@link ScreeningEvent} instance. */ @@ -53,14 +57,14 @@ public ScreeningEvent build() { /** * The type of screening or video broadcast used (e.g. IMAX, 3D, SD, HD, etc.). */ - public Builder videoFormat(String videoFormat) { + @NotNull public Builder videoFormat(String videoFormat) { this.videoFormat = videoFormat; return this; } /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(Language language) { + @NotNull public Builder subtitleLanguage(Language language) { if (this.subtitleLanguage == null) this.subtitleLanguage = new LanguageOrString(); this.subtitleLanguage.setLanguage(language); return this; @@ -68,13 +72,13 @@ public Builder subtitleLanguage(Language language) { /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(Language.Builder language) { + @NotNull public Builder subtitleLanguage(Language.Builder language) { return this.subtitleLanguage(language.build()); } /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(String subtitleLanguage) { + @NotNull public Builder subtitleLanguage(String subtitleLanguage) { if (this.subtitleLanguage == null) this.subtitleLanguage = new LanguageOrString(); this.subtitleLanguage.setString(subtitleLanguage); return this; @@ -82,33 +86,33 @@ public Builder subtitleLanguage(String subtitleLanguage) { /** * The movie presented during this event. */ - public Builder workPresented(Movie movie) { + @NotNull public Builder workPresented(Movie movie) { this.workPresented = movie; return this; } /** * The movie presented during this event. */ - public Builder workPresented(Movie.Builder movie) { + @NotNull public Builder workPresented(Movie.Builder movie) { return this.workPresented(movie.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -116,13 +120,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -130,13 +134,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -144,13 +148,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -158,53 +162,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -212,13 +216,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -226,20 +230,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -247,13 +251,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -261,113 +265,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -401,7 +405,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -436,7 +440,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -469,7 +473,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -477,38 +481,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -547,62 +551,62 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder videoFormat(String videoFormat); - Builder subtitleLanguage(Language language); - Builder subtitleLanguage(Language.Builder language); - Builder subtitleLanguage(String subtitleLanguage); - Builder workPresented(Movie movie); - Builder workPresented(Movie.Builder movie); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder videoFormat(String videoFormat); + @NotNull Builder subtitleLanguage(Language language); + @NotNull Builder subtitleLanguage(Language.Builder language); + @NotNull Builder subtitleLanguage(String subtitleLanguage); + @NotNull Builder workPresented(Movie movie); + @NotNull Builder workPresented(Movie.Builder movie); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ScreeningEvent(String videoFormat, LanguageOrString subtitleLanguage, Movie workPresented, 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) { diff --git a/src/main/java/org/schema/Sculpture.java b/src/main/java/org/schema/Sculpture.java index 349da893..ceb42c57 100644 --- a/src/main/java/org/schema/Sculpture.java +++ b/src/main/java/org/schema/Sculpture.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A piece of sculpture. */ @@ -25,7 +29,7 @@ public class Sculpture extends CreativeWork { /** * Builder for {@link Sculpture} */ - public static final class SculptureThingBuilder implements Builder { + static final class SculptureThingBuilder implements Builder { /** * Creates new {@link Sculpture} instance. */ @@ -35,127 +39,127 @@ public Sculpture build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/SeaBodyOfWater.java b/src/main/java/org/schema/SeaBodyOfWater.java index 43d54b49..d1232660 100644 --- a/src/main/java/org/schema/SeaBodyOfWater.java +++ b/src/main/java/org/schema/SeaBodyOfWater.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A sea (for example, the Caspian sea). */ @@ -25,7 +29,7 @@ public class SeaBodyOfWater extends BodyOfWater { /** * Builder for {@link SeaBodyOfWater} */ - public static final class SeaBodyOfWaterThingBuilder implements Builder { + static final class SeaBodyOfWaterThingBuilder implements Builder { /** * Creates new {@link SeaBodyOfWater} instance. */ @@ -35,66 +39,66 @@ public SeaBodyOfWater build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SearchAction.java b/src/main/java/org/schema/SearchAction.java index 901705ff..8293b5eb 100644 --- a/src/main/java/org/schema/SearchAction.java +++ b/src/main/java/org/schema/SearchAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of searching for an object.

Related actions:

  • FindAction: SearchAction generally leads to a FindAction, but not necessarily
. */ @@ -31,7 +35,7 @@ public String getQuery() { /** * Builder for {@link SearchAction} */ - public static final class SearchActionThingBuilder implements Builder { + static final class SearchActionThingBuilder implements Builder { /** * Creates new {@link SearchAction} instance. */ @@ -41,14 +45,14 @@ public SearchAction build() { /** * A sub property of instrument. The query used on this action. */ - public Builder query(String query) { + @NotNull public Builder query(String query) { this.query = query; return this; } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,31 +317,31 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder query(String query); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder query(String query); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected SearchAction(String query, 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) { diff --git a/src/main/java/org/schema/SearchResultsPage.java b/src/main/java/org/schema/SearchResultsPage.java index 9cb3cdb2..4e5352db 100644 --- a/src/main/java/org/schema/SearchResultsPage.java +++ b/src/main/java/org/schema/SearchResultsPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web page type: Search results page. */ @@ -25,7 +29,7 @@ public class SearchResultsPage extends WebPage { /** * Builder for {@link SearchResultsPage} */ - public static final class SearchResultsPageThingBuilder implements Builder { + static final class SearchResultsPageThingBuilder implements Builder { /** * Creates new {@link SearchResultsPage} instance. */ @@ -35,7 +39,7 @@ public SearchResultsPage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/Season.java b/src/main/java/org/schema/Season.java index 0f6f8a49..cdd92f32 100644 --- a/src/main/java/org/schema/Season.java +++ b/src/main/java/org/schema/Season.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A media season e.g. tv, radio, video game etc. */ @@ -25,7 +29,7 @@ public class Season extends CreativeWork { /** * Builder for {@link Season} */ - public static final class SeasonThingBuilder implements Builder { + static final class SeasonThingBuilder implements Builder { /** * Creates new {@link Season} instance. */ @@ -35,127 +39,127 @@ public Season build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/Seat.java b/src/main/java/org/schema/Seat.java index af62bf1b..41f6f633 100644 --- a/src/main/java/org/schema/Seat.java +++ b/src/main/java/org/schema/Seat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Used to describe a seat, such as a reserved seat in an event reservation. */ @@ -49,7 +53,7 @@ public QualitativeValueOrString getSeatingType() { /** * Builder for {@link Seat} */ - public static final class SeatThingBuilder implements Builder { + static final class SeatThingBuilder implements Builder { /** * Creates new {@link Seat} instance. */ @@ -59,28 +63,28 @@ public Seat build() { /** * The location of the reserved seat (e.g., 27). */ - public Builder seatNumber(String seatNumber) { + @NotNull public Builder seatNumber(String seatNumber) { this.seatNumber = seatNumber; return this; } /** * The row location of the reserved seat (e.g., B). */ - public Builder seatRow(String seatRow) { + @NotNull public Builder seatRow(String seatRow) { this.seatRow = seatRow; return this; } /** * The section location of the reserved seat (e.g. Orchestra). */ - public Builder seatSection(String seatSection) { + @NotNull public Builder seatSection(String seatSection) { this.seatSection = seatSection; return this; } /** * The type/class of the seat. */ - public Builder seatingType(QualitativeValue qualitativeValue) { + @NotNull public Builder seatingType(QualitativeValue qualitativeValue) { if (this.seatingType == null) this.seatingType = new QualitativeValueOrString(); this.seatingType.setQualitativeValue(qualitativeValue); return this; @@ -88,13 +92,13 @@ public Builder seatingType(QualitativeValue qualitativeValue) { /** * The type/class of the seat. */ - public Builder seatingType(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder seatingType(QualitativeValue.Builder qualitativeValue) { return this.seatingType(qualitativeValue.build()); } /** * The type/class of the seat. */ - public Builder seatingType(String seatingType) { + @NotNull public Builder seatingType(String seatingType) { if (this.seatingType == null) this.seatingType = new QualitativeValueOrString(); this.seatingType.setString(seatingType); return this; @@ -102,21 +106,21 @@ public Builder seatingType(String seatingType) { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -150,7 +154,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -185,7 +189,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -218,7 +222,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -226,38 +230,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -279,24 +283,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder seatNumber(String seatNumber); - Builder seatRow(String seatRow); - Builder seatSection(String seatSection); - Builder seatingType(QualitativeValue qualitativeValue); - Builder seatingType(QualitativeValue.Builder qualitativeValue); - Builder seatingType(String seatingType); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder seatNumber(String seatNumber); + @NotNull Builder seatRow(String seatRow); + @NotNull Builder seatSection(String seatSection); + @NotNull Builder seatingType(QualitativeValue qualitativeValue); + @NotNull Builder seatingType(QualitativeValue.Builder qualitativeValue); + @NotNull Builder seatingType(String seatingType); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Seat(String seatNumber, String seatRow, String seatSection, QualitativeValueOrString seatingType, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/SeatingMap.java b/src/main/java/org/schema/SeatingMap.java index e40bdb99..0ed3b273 100644 --- a/src/main/java/org/schema/SeatingMap.java +++ b/src/main/java/org/schema/SeatingMap.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A seating map. */ @@ -25,7 +29,7 @@ public class SeatingMap { /** * Builder for {@link SeatingMap} */ - public static final class SeatingMapThingBuilder implements Builder { + static final class SeatingMapThingBuilder implements Builder { /** * Creates new {@link SeatingMap} instance. */ @@ -34,7 +38,7 @@ public SeatingMap build() { } } public interface Builder extends ThingBuilder { - + } protected SeatingMap() { diff --git a/src/main/java/org/schema/SelfStorage.java b/src/main/java/org/schema/SelfStorage.java index 698e5ca8..60eda6de 100644 --- a/src/main/java/org/schema/SelfStorage.java +++ b/src/main/java/org/schema/SelfStorage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A self-storage facility. */ @@ -25,7 +29,7 @@ public class SelfStorage extends LocalBusiness { /** * Builder for {@link SelfStorage} */ - public static final class SelfStorageThingBuilder implements Builder { + static final class SelfStorageThingBuilder implements Builder { /** * Creates new {@link SelfStorage} instance. */ @@ -35,107 +39,107 @@ public SelfStorage build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SellAction.java b/src/main/java/org/schema/SellAction.java index 846dcba4..9c3cf1ab 100644 --- a/src/main/java/org/schema/SellAction.java +++ b/src/main/java/org/schema/SellAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of taking money from a buyer in exchange for goods or services rendered. An agent sells an object, product, or service to a buyer for a price. Reciprocal of BuyAction. */ @@ -31,7 +35,7 @@ public Person getBuyer() { /** * Builder for {@link SellAction} */ - public static final class SellActionThingBuilder implements Builder { + static final class SellActionThingBuilder implements Builder { /** * Creates new {@link SellAction} instance. */ @@ -41,14 +45,14 @@ public SellAction build() { /** * A sub property of participant. The participant/person/organization that bought the object. */ - public Builder buyer(Person person) { + @NotNull public Builder buyer(Person person) { this.buyer = person; return this; } /** * A sub property of participant. The participant/person/organization that bought the object. */ - public Builder buyer(Person.Builder person) { + @NotNull public Builder buyer(Person.Builder person) { return this.buyer(person.build()); } /** @@ -74,7 +78,7 @@ public Builder buyer(Person.Builder person) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -102,7 +106,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -110,20 +114,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -131,13 +135,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -145,7 +149,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -153,7 +157,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -162,67 +166,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -256,7 +260,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -291,7 +295,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -324,7 +328,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -332,38 +336,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -390,36 +394,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder buyer(Person person); - Builder buyer(Person.Builder person); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder buyer(Person person); + @NotNull Builder buyer(Person.Builder person); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/SendAction.java b/src/main/java/org/schema/SendAction.java index d99eeac0..0a0ba93b 100644 --- a/src/main/java/org/schema/SendAction.java +++ b/src/main/java/org/schema/SendAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of physically/electronically dispatching an object for transfer from an origin to a destination.

Related actions:

  • ReceiveAction: The reciprocal of SendAction.
  • GiveAction: Unlike GiveAction, SendAction does not imply the transfer of ownership (e.g. I can send you my laptop, but I'm not necessarily giving it to you)
. */ @@ -37,7 +41,7 @@ public AudienceOrOrganizationOrPerson getRecipient() { /** * Builder for {@link SendAction} */ - public static final class SendActionThingBuilder implements Builder { + static final class SendActionThingBuilder implements Builder { /** * Creates new {@link SendAction} instance. */ @@ -47,20 +51,20 @@ public SendAction build() { /** * A sub property of instrument. The method of delivery. */ - public Builder deliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder deliveryMethod(DeliveryMethod deliveryMethod) { this.deliveryMethod = deliveryMethod; return this; } /** * A sub property of instrument. The method of delivery. */ - public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.deliveryMethod(deliveryMethod.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -68,13 +72,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -82,13 +86,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -96,39 +100,39 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -136,13 +140,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -150,7 +154,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -158,7 +162,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -167,67 +171,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -261,7 +265,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -296,7 +300,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -329,7 +333,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -337,38 +341,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -396,42 +400,42 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder deliveryMethod(DeliveryMethod deliveryMethod); - Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder deliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected SendAction(DeliveryMethod deliveryMethod, AudienceOrOrganizationOrPerson recipient, 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) { diff --git a/src/main/java/org/schema/SerialNumber.java b/src/main/java/org/schema/SerialNumber.java index f23d373d..edb7ff56 100644 --- a/src/main/java/org/schema/SerialNumber.java +++ b/src/main/java/org/schema/SerialNumber.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** */ public interface SerialNumber { diff --git a/src/main/java/org/schema/Series.java b/src/main/java/org/schema/Series.java index 9e1627a7..54e08a5f 100644 --- a/src/main/java/org/schema/Series.java +++ b/src/main/java/org/schema/Series.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * * A Series in schema.org is a group of related items, typically but not necessarily of the same kind. @@ -26,7 +30,7 @@ public class Series extends CreativeWork { /** * Builder for {@link Series} */ - public static final class SeriesThingBuilder implements Builder { + static final class SeriesThingBuilder implements Builder { /** * Creates new {@link Series} instance. */ @@ -36,127 +40,127 @@ public Series build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -164,13 +168,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -178,20 +182,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -199,13 +203,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -213,40 +217,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -254,13 +258,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -268,13 +272,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -282,13 +286,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -296,21 +300,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -318,7 +322,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -326,7 +330,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -334,7 +338,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -342,7 +346,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -350,13 +354,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -364,101 +368,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -466,13 +470,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -480,35 +484,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -516,13 +520,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -530,53 +534,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -584,13 +588,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -598,127 +602,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -726,7 +730,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -734,7 +738,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -742,7 +746,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -750,20 +754,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -771,13 +775,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -785,66 +789,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -852,13 +856,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -866,40 +870,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -933,7 +937,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -968,7 +972,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1001,7 +1005,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1009,38 +1013,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1103,7 +1107,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1121,144 +1125,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/Service.java b/src/main/java/org/schema/Service.java index 55a00ed2..333432ce 100644 --- a/src/main/java/org/schema/Service.java +++ b/src/main/java/org/schema/Service.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A service provided by an organization, e.g. delivery service, print services, etc. */ @@ -67,7 +71,7 @@ public OrganizationOrPerson getProvider() { /** * Builder for {@link Service} */ - public static final class ServiceThingBuilder implements Builder { + static final class ServiceThingBuilder implements Builder { /** * Creates new {@link Service} instance. */ @@ -77,79 +81,79 @@ public Service build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel serviceChannel) { this.availableChannel = serviceChannel; return this; } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel.Builder serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel.Builder serviceChannel) { return this.availableChannel(serviceChannel.build()); } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing thing) { + @NotNull public Builder serviceOutput(Thing thing) { this.serviceOutput = thing; return this; } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing.Builder thing) { + @NotNull public Builder serviceOutput(Thing.Builder thing) { return this.serviceOutput(thing.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea administrativeArea) { this.serviceArea = administrativeArea; return this; } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { return this.serviceArea(administrativeArea.build()); } /** * The type of service being offered, e.g. veterans' benefits, emergency relief, etc. */ - public Builder serviceType(String serviceType) { + @NotNull public Builder serviceType(String serviceType) { this.serviceType = serviceType; return this; } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -157,13 +161,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -171,27 +175,27 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -225,7 +229,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -260,7 +264,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -293,7 +297,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -301,38 +305,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -357,33 +361,33 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder availableChannel(ServiceChannel serviceChannel); - Builder availableChannel(ServiceChannel.Builder serviceChannel); - Builder serviceOutput(Thing thing); - Builder serviceOutput(Thing.Builder thing); - Builder review(Review review); - Builder review(Review.Builder review); - Builder serviceArea(AdministrativeArea administrativeArea); - Builder serviceArea(AdministrativeArea.Builder administrativeArea); - Builder serviceType(String serviceType); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder availableChannel(ServiceChannel serviceChannel); + @NotNull Builder availableChannel(ServiceChannel.Builder serviceChannel); + @NotNull Builder serviceOutput(Thing thing); + @NotNull Builder serviceOutput(Thing.Builder thing); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder serviceArea(AdministrativeArea administrativeArea); + @NotNull Builder serviceArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder serviceType(String serviceType); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Service(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) { diff --git a/src/main/java/org/schema/ServiceChannel.java b/src/main/java/org/schema/ServiceChannel.java index 4550d4e1..f567d6f4 100644 --- a/src/main/java/org/schema/ServiceChannel.java +++ b/src/main/java/org/schema/ServiceChannel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A means for accessing a service, e.g. a government office location, web site, or phone number. */ @@ -73,7 +77,7 @@ public String getServiceUrl() { /** * Builder for {@link ServiceChannel} */ - public static final class ServiceChannelThingBuilder implements Builder { + static final class ServiceChannelThingBuilder implements Builder { /** * Creates new {@link ServiceChannel} instance. */ @@ -83,119 +87,119 @@ public ServiceChannel build() { /** * A language someone may use with the item. */ - public Builder availableLanguage(Language language) { + @NotNull public Builder availableLanguage(Language language) { this.availableLanguage = language; return this; } /** * A language someone may use with the item. */ - public Builder availableLanguage(Language.Builder language) { + @NotNull public Builder availableLanguage(Language.Builder language) { return this.availableLanguage(language.build()); } /** * Estimated processing time for the service using this channel. */ - public Builder processingTime(Duration duration) { + @NotNull public Builder processingTime(Duration duration) { this.processingTime = duration; return this; } /** * Estimated processing time for the service using this channel. */ - public Builder processingTime(Duration.Builder duration) { + @NotNull public Builder processingTime(Duration.Builder duration) { return this.processingTime(duration.build()); } /** * The service provided by this channel. */ - public Builder providesService(Service service) { + @NotNull public Builder providesService(Service service) { this.providesService = service; return this; } /** * The service provided by this channel. */ - public Builder providesService(Service.Builder service) { + @NotNull public Builder providesService(Service.Builder service) { return this.providesService(service.build()); } /** * The location (e.g. civic structure, local business, etc.) where a person can go to access the service. */ - public Builder serviceLocation(Place place) { + @NotNull public Builder serviceLocation(Place place) { this.serviceLocation = place; return this; } /** * The location (e.g. civic structure, local business, etc.) where a person can go to access the service. */ - public Builder serviceLocation(Place.Builder place) { + @NotNull public Builder serviceLocation(Place.Builder place) { return this.serviceLocation(place.build()); } /** * The phone number to use to access the service. */ - public Builder servicePhone(ContactPoint contactPoint) { + @NotNull public Builder servicePhone(ContactPoint contactPoint) { this.servicePhone = contactPoint; return this; } /** * The phone number to use to access the service. */ - public Builder servicePhone(ContactPoint.Builder contactPoint) { + @NotNull public Builder servicePhone(ContactPoint.Builder contactPoint) { return this.servicePhone(contactPoint.build()); } /** * The address for accessing the service by mail. */ - public Builder servicePostalAddress(PostalAddress postalAddress) { + @NotNull public Builder servicePostalAddress(PostalAddress postalAddress) { this.servicePostalAddress = postalAddress; return this; } /** * The address for accessing the service by mail. */ - public Builder servicePostalAddress(PostalAddress.Builder postalAddress) { + @NotNull public Builder servicePostalAddress(PostalAddress.Builder postalAddress) { return this.servicePostalAddress(postalAddress.build()); } /** * The number to access the service by text message. */ - public Builder serviceSmsNumber(ContactPoint contactPoint) { + @NotNull public Builder serviceSmsNumber(ContactPoint contactPoint) { this.serviceSmsNumber = contactPoint; return this; } /** * The number to access the service by text message. */ - public Builder serviceSmsNumber(ContactPoint.Builder contactPoint) { + @NotNull public Builder serviceSmsNumber(ContactPoint.Builder contactPoint) { return this.serviceSmsNumber(contactPoint.build()); } /** * The website to access the service. */ - public Builder serviceUrl(String serviceUrl) { + @NotNull public Builder serviceUrl(String serviceUrl) { this.serviceUrl = serviceUrl; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -229,7 +233,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -264,7 +268,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -297,7 +301,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -305,38 +309,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -362,33 +366,33 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder availableLanguage(Language language); - Builder availableLanguage(Language.Builder language); - Builder processingTime(Duration duration); - Builder processingTime(Duration.Builder duration); - Builder providesService(Service service); - Builder providesService(Service.Builder service); - Builder serviceLocation(Place place); - Builder serviceLocation(Place.Builder place); - Builder servicePhone(ContactPoint contactPoint); - Builder servicePhone(ContactPoint.Builder contactPoint); - Builder servicePostalAddress(PostalAddress postalAddress); - Builder servicePostalAddress(PostalAddress.Builder postalAddress); - Builder serviceSmsNumber(ContactPoint contactPoint); - Builder serviceSmsNumber(ContactPoint.Builder contactPoint); - Builder serviceUrl(String serviceUrl); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder availableLanguage(Language language); + @NotNull Builder availableLanguage(Language.Builder language); + @NotNull Builder processingTime(Duration duration); + @NotNull Builder processingTime(Duration.Builder duration); + @NotNull Builder providesService(Service service); + @NotNull Builder providesService(Service.Builder service); + @NotNull Builder serviceLocation(Place place); + @NotNull Builder serviceLocation(Place.Builder place); + @NotNull Builder servicePhone(ContactPoint contactPoint); + @NotNull Builder servicePhone(ContactPoint.Builder contactPoint); + @NotNull Builder servicePostalAddress(PostalAddress postalAddress); + @NotNull Builder servicePostalAddress(PostalAddress.Builder postalAddress); + @NotNull Builder serviceSmsNumber(ContactPoint contactPoint); + @NotNull Builder serviceSmsNumber(ContactPoint.Builder contactPoint); + @NotNull Builder serviceUrl(String serviceUrl); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected ServiceChannel(Language availableLanguage, Duration processingTime, Service providesService, Place serviceLocation, ContactPoint servicePhone, PostalAddress servicePostalAddress, ContactPoint serviceSmsNumber, String serviceUrl, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/ShareAction.java b/src/main/java/org/schema/ShareAction.java index ba9c8fab..9257b414 100644 --- a/src/main/java/org/schema/ShareAction.java +++ b/src/main/java/org/schema/ShareAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of distributing content to people for their amusement or edification. */ @@ -25,7 +29,7 @@ public class ShareAction extends CommunicateAction { /** * Builder for {@link ShareAction} */ - public static final class ShareActionThingBuilder implements Builder { + static final class ShareActionThingBuilder implements Builder { /** * Creates new {@link ShareAction} instance. */ @@ -35,20 +39,20 @@ public ShareAction build() { /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -56,13 +60,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -70,7 +74,7 @@ public Builder inLanguage(String inLanguage) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -78,13 +82,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -92,13 +96,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -106,13 +110,13 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -120,13 +124,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -134,7 +138,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -142,7 +146,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -151,67 +155,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -245,7 +249,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -280,7 +284,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -313,7 +317,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -321,38 +325,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -379,41 +383,41 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ShoeStore.java b/src/main/java/org/schema/ShoeStore.java index 5a479ab9..e5d85e8e 100644 --- a/src/main/java/org/schema/ShoeStore.java +++ b/src/main/java/org/schema/ShoeStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A shoe store. */ @@ -25,7 +29,7 @@ public class ShoeStore extends Store { /** * Builder for {@link ShoeStore} */ - public static final class ShoeStoreThingBuilder implements Builder { + static final class ShoeStoreThingBuilder implements Builder { /** * Creates new {@link ShoeStore} instance. */ @@ -35,107 +39,107 @@ public ShoeStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/ShoppingCenter.java b/src/main/java/org/schema/ShoppingCenter.java index 96421e70..431e5586 100644 --- a/src/main/java/org/schema/ShoppingCenter.java +++ b/src/main/java/org/schema/ShoppingCenter.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A shopping center or mall. */ @@ -25,7 +29,7 @@ public class ShoppingCenter extends LocalBusiness { /** * Builder for {@link ShoppingCenter} */ - public static final class ShoppingCenterThingBuilder implements Builder { + static final class ShoppingCenterThingBuilder implements Builder { /** * Creates new {@link ShoppingCenter} instance. */ @@ -35,107 +39,107 @@ public ShoppingCenter build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SingleBlindedTrial.java b/src/main/java/org/schema/SingleBlindedTrial.java index 9643d58a..012e4f66 100644 --- a/src/main/java/org/schema/SingleBlindedTrial.java +++ b/src/main/java/org/schema/SingleBlindedTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A trial design in which the researcher knows which treatment the patient was randomly assigned to but the patient does not. */ @@ -25,7 +29,7 @@ public class SingleBlindedTrial { /** * Builder for {@link SingleBlindedTrial} */ - public static final class SingleBlindedTrialThingBuilder implements Builder { + static final class SingleBlindedTrialThingBuilder implements Builder { /** * Creates new {@link SingleBlindedTrial} instance. */ @@ -34,7 +38,7 @@ public SingleBlindedTrial build() { } } public interface Builder extends ThingBuilder { - + } protected SingleBlindedTrial() { diff --git a/src/main/java/org/schema/SingleCenterTrial.java b/src/main/java/org/schema/SingleCenterTrial.java index bad87700..593f887b 100644 --- a/src/main/java/org/schema/SingleCenterTrial.java +++ b/src/main/java/org/schema/SingleCenterTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A trial that takes place at a single center. */ @@ -25,7 +29,7 @@ public class SingleCenterTrial { /** * Builder for {@link SingleCenterTrial} */ - public static final class SingleCenterTrialThingBuilder implements Builder { + static final class SingleCenterTrialThingBuilder implements Builder { /** * Creates new {@link SingleCenterTrial} instance. */ @@ -34,7 +38,7 @@ public SingleCenterTrial build() { } } public interface Builder extends ThingBuilder { - + } protected SingleCenterTrial() { diff --git a/src/main/java/org/schema/SingleFamilyResidence.java b/src/main/java/org/schema/SingleFamilyResidence.java index 4995feab..b3ad61a0 100644 --- a/src/main/java/org/schema/SingleFamilyResidence.java +++ b/src/main/java/org/schema/SingleFamilyResidence.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Residence type: Single-family home. */ @@ -25,7 +29,7 @@ public class SingleFamilyResidence extends Residence { /** * Builder for {@link SingleFamilyResidence} */ - public static final class SingleFamilyResidenceThingBuilder implements Builder { + static final class SingleFamilyResidenceThingBuilder implements Builder { /** * Creates new {@link SingleFamilyResidence} instance. */ @@ -35,66 +39,66 @@ public SingleFamilyResidence build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SinglePlayer.java b/src/main/java/org/schema/SinglePlayer.java index 58aeb6e9..df93d391 100644 --- a/src/main/java/org/schema/SinglePlayer.java +++ b/src/main/java/org/schema/SinglePlayer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Play mode: SinglePlayer. Which is played by a lone player. */ @@ -25,7 +29,7 @@ public class SinglePlayer { /** * Builder for {@link SinglePlayer} */ - public static final class SinglePlayerThingBuilder implements Builder { + static final class SinglePlayerThingBuilder implements Builder { /** * Creates new {@link SinglePlayer} instance. */ @@ -34,7 +38,7 @@ public SinglePlayer build() { } } public interface Builder extends ThingBuilder { - + } protected SinglePlayer() { diff --git a/src/main/java/org/schema/SingleRelease.java b/src/main/java/org/schema/SingleRelease.java index 0e8c8b4f..2dbdc699 100644 --- a/src/main/java/org/schema/SingleRelease.java +++ b/src/main/java/org/schema/SingleRelease.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * SingleRelease. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class SingleRelease { /** * Builder for {@link SingleRelease} */ - public static final class SingleReleaseThingBuilder implements Builder { + static final class SingleReleaseThingBuilder implements Builder { /** * Creates new {@link SingleRelease} instance. */ @@ -35,7 +39,7 @@ public SingleRelease build() { } } public interface Builder extends ThingBuilder { - + } protected SingleRelease() { diff --git a/src/main/java/org/schema/SiteNavigationElement.java b/src/main/java/org/schema/SiteNavigationElement.java index d2951b01..66f7a3d7 100644 --- a/src/main/java/org/schema/SiteNavigationElement.java +++ b/src/main/java/org/schema/SiteNavigationElement.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A navigation element of the page. */ @@ -25,7 +29,7 @@ public class SiteNavigationElement extends WebPageElement { /** * Builder for {@link SiteNavigationElement} */ - public static final class SiteNavigationElementThingBuilder implements Builder { + static final class SiteNavigationElementThingBuilder implements Builder { /** * Creates new {@link SiteNavigationElement} instance. */ @@ -35,127 +39,127 @@ public SiteNavigationElement build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/SkiResort.java b/src/main/java/org/schema/SkiResort.java index 5fc3ed2a..f246fb23 100644 --- a/src/main/java/org/schema/SkiResort.java +++ b/src/main/java/org/schema/SkiResort.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A ski resort. */ @@ -25,7 +29,7 @@ public class SkiResort extends SportsActivityLocation { /** * Builder for {@link SkiResort} */ - public static final class SkiResortThingBuilder implements Builder { + static final class SkiResortThingBuilder implements Builder { /** * Creates new {@link SkiResort} instance. */ @@ -35,107 +39,107 @@ public SkiResort build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Skin.java b/src/main/java/org/schema/Skin.java index 7fc86acb..8a9990f2 100644 --- a/src/main/java/org/schema/Skin.java +++ b/src/main/java/org/schema/Skin.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Skin. */ @@ -25,7 +29,7 @@ public class Skin { /** * Builder for {@link Skin} */ - public static final class SkinThingBuilder implements Builder { + static final class SkinThingBuilder implements Builder { /** * Creates new {@link Skin} instance. */ @@ -34,7 +38,7 @@ public Skin build() { } } public interface Builder extends ThingBuilder { - + } protected Skin() { diff --git a/src/main/java/org/schema/SocialEvent.java b/src/main/java/org/schema/SocialEvent.java index 37d83e4f..fbbf8a62 100644 --- a/src/main/java/org/schema/SocialEvent.java +++ b/src/main/java/org/schema/SocialEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Social event. */ @@ -25,7 +29,7 @@ public class SocialEvent extends Event { /** * Builder for {@link SocialEvent} */ - public static final class SocialEventThingBuilder implements Builder { + static final class SocialEventThingBuilder implements Builder { /** * Creates new {@link SocialEvent} instance. */ @@ -35,20 +39,20 @@ public SocialEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SoftwareApplication.java b/src/main/java/org/schema/SoftwareApplication.java index 5b31676f..03f4f655 100644 --- a/src/main/java/org/schema/SoftwareApplication.java +++ b/src/main/java/org/schema/SoftwareApplication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A software application. */ @@ -79,7 +83,7 @@ public String getFileFormat() { /** * Size of the application / package (e.g. 18MB). In the absence of a unit (MB, KB etc.), KB will be assumed. */ - public Integer getFileSize() { + public int getFileSize() { return myFileSize; } /** @@ -157,7 +161,7 @@ public CreativeWork getSoftwareHelp() { /** * Builder for {@link SoftwareApplication} */ - public static final class SoftwareApplicationThingBuilder implements Builder { + static final class SoftwareApplicationThingBuilder implements Builder { /** * Creates new {@link SoftwareApplication} instance. */ @@ -167,126 +171,126 @@ public SoftwareApplication build() { /** * Type of software application, e.g. "Game, Multimedia". */ - public Builder applicationCategory(String applicationCategory) { + @NotNull public Builder applicationCategory(String applicationCategory) { this.applicationCategory = applicationCategory; return this; } /** * Subcategory of the application, e.g. "Arcade Game". */ - public Builder applicationSubCategory(String applicationSubCategory) { + @NotNull public Builder applicationSubCategory(String applicationSubCategory) { this.applicationSubCategory = applicationSubCategory; return this; } /** * The name of the application suite to which the application belongs (e.g. Excel belongs to Office). */ - public Builder applicationSuite(String applicationSuite) { + @NotNull public Builder applicationSuite(String applicationSuite) { this.applicationSuite = applicationSuite; return this; } /** * Countries for which the application is not supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder countriesNotSupported(String countriesNotSupported) { + @NotNull public Builder countriesNotSupported(String countriesNotSupported) { this.countriesNotSupported = countriesNotSupported; return this; } /** * Countries for which the application is supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder countriesSupported(String countriesSupported) { + @NotNull public Builder countriesSupported(String countriesSupported) { this.countriesSupported = countriesSupported; return this; } /** * Device required to run the application. Used in cases where a specific make/model is required to run the application. */ - public Builder availableOnDevice(String availableOnDevice) { + @NotNull public Builder availableOnDevice(String availableOnDevice) { this.availableOnDevice = availableOnDevice; return this; } /** * If the file can be downloaded, URL to download the binary. */ - public Builder downloadUrl(String downloadUrl) { + @NotNull public Builder downloadUrl(String downloadUrl) { this.downloadUrl = downloadUrl; return this; } /** * Features or modules provided by this application (and possibly required by other applications). */ - public Builder featureList(String featureList) { + @NotNull public Builder featureList(String featureList) { this.featureList = featureList; return this; } /** * MIME format of the binary (e.g. application/zip). */ - public Builder fileFormat(String fileFormat) { + @NotNull public Builder fileFormat(String fileFormat) { this.fileFormat = fileFormat; return this; } /** * Size of the application / package (e.g. 18MB). In the absence of a unit (MB, KB etc.), KB will be assumed. */ - public Builder fileSize(Integer integer) { - this.fileSize = integer; + @NotNull public Builder fileSize(int fileSize) { + this.fileSize = fileSize; return this; } /** * URL at which the app may be installed, if different from the URL of the item. */ - public Builder installUrl(String installUrl) { + @NotNull public Builder installUrl(String installUrl) { this.installUrl = installUrl; return this; } /** * Minimum memory requirements. */ - public Builder memoryRequirements(String memoryRequirements) { + @NotNull public Builder memoryRequirements(String memoryRequirements) { this.memoryRequirements = memoryRequirements; return this; } /** * Operating systems supported (Windows 7, OSX 10.6, Android 1.6). */ - public Builder operatingSystem(String operatingSystem) { + @NotNull public Builder operatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; return this; } /** * Permission(s) required to run the app (for example, a mobile app may require full internet access or may run only on wifi). */ - public Builder permissions(String permissions) { + @NotNull public Builder permissions(String permissions) { this.permissions = permissions; return this; } /** * Processor architecture required to run the application (e.g. IA64). */ - public Builder processorRequirements(String processorRequirements) { + @NotNull public Builder processorRequirements(String processorRequirements) { this.processorRequirements = processorRequirements; return this; } /** * Description of what changed in this version. */ - public Builder releaseNotes(String releaseNotes) { + @NotNull public Builder releaseNotes(String releaseNotes) { this.releaseNotes = releaseNotes; return this; } /** * Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (Examples: DirectX, Java or .NET runtime). */ - public Builder softwareRequirements(String softwareRequirements) { + @NotNull public Builder softwareRequirements(String softwareRequirements) { this.softwareRequirements = softwareRequirements; return this; } /** * A link to a screenshot image of the app. */ - public Builder screenshot(ImageObject imageObject) { + @NotNull public Builder screenshot(ImageObject imageObject) { if (this.screenshot == null) this.screenshot = new ImageObjectOrString(); this.screenshot.setImageObject(imageObject); return this; @@ -294,13 +298,13 @@ public Builder screenshot(ImageObject imageObject) { /** * A link to a screenshot image of the app. */ - public Builder screenshot(ImageObject.Builder imageObject) { + @NotNull public Builder screenshot(ImageObject.Builder imageObject) { return this.screenshot(imageObject.build()); } /** * A link to a screenshot image of the app. */ - public Builder screenshot(String screenshot) { + @NotNull public Builder screenshot(String screenshot) { if (this.screenshot == null) this.screenshot = new ImageObjectOrString(); this.screenshot.setString(screenshot); return this; @@ -308,167 +312,167 @@ public Builder screenshot(String screenshot) { /** * Version of the software instance. */ - public Builder softwareVersion(String softwareVersion) { + @NotNull public Builder softwareVersion(String softwareVersion) { this.softwareVersion = softwareVersion; return this; } /** * Storage requirements (free space required). */ - public Builder storageRequirements(String storageRequirements) { + @NotNull public Builder storageRequirements(String storageRequirements) { this.storageRequirements = storageRequirements; return this; } /** * Additional content for a software application. */ - public Builder softwareAddOn(SoftwareApplication softwareApplication) { + @NotNull public Builder softwareAddOn(SoftwareApplication softwareApplication) { this.softwareAddOn = softwareApplication; return this; } /** * Additional content for a software application. */ - public Builder softwareAddOn(SoftwareApplication.Builder softwareApplication) { + @NotNull public Builder softwareAddOn(SoftwareApplication.Builder softwareApplication) { return this.softwareAddOn(softwareApplication.build()); } /** * Software application help. */ - public Builder softwareHelp(CreativeWork creativeWork) { + @NotNull public Builder softwareHelp(CreativeWork creativeWork) { this.softwareHelp = creativeWork; return this; } /** * Software application help. */ - public Builder softwareHelp(CreativeWork.Builder creativeWork) { + @NotNull public Builder softwareHelp(CreativeWork.Builder creativeWork) { return this.softwareHelp(creativeWork.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -476,13 +480,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -490,20 +494,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -511,13 +515,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -525,40 +529,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -566,13 +570,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -580,13 +584,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -594,13 +598,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -608,21 +612,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -630,7 +634,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -638,7 +642,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -646,7 +650,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -654,7 +658,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -662,13 +666,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -676,101 +680,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -778,13 +782,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -792,35 +796,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -828,13 +832,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -842,53 +846,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -896,13 +900,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -910,127 +914,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -1038,7 +1042,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -1046,7 +1050,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -1054,7 +1058,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -1062,20 +1066,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -1083,13 +1087,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -1097,66 +1101,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1164,13 +1168,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1178,40 +1182,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1245,7 +1249,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1280,7 +1284,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1313,7 +1317,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1321,38 +1325,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1368,7 +1372,7 @@ public Builder id(long id) { private String downloadUrl; private String featureList; private String fileFormat; - private Integer fileSize; + private int fileSize; private String installUrl; private String memoryRequirements; private String operatingSystem; @@ -1437,7 +1441,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1455,170 +1459,170 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder applicationCategory(String applicationCategory); - Builder applicationSubCategory(String applicationSubCategory); - Builder applicationSuite(String applicationSuite); - Builder countriesNotSupported(String countriesNotSupported); - Builder countriesSupported(String countriesSupported); - Builder availableOnDevice(String availableOnDevice); - Builder downloadUrl(String downloadUrl); - Builder featureList(String featureList); - Builder fileFormat(String fileFormat); - Builder fileSize(Integer integer); - Builder installUrl(String installUrl); - Builder memoryRequirements(String memoryRequirements); - Builder operatingSystem(String operatingSystem); - Builder permissions(String permissions); - Builder processorRequirements(String processorRequirements); - Builder releaseNotes(String releaseNotes); - Builder softwareRequirements(String softwareRequirements); - Builder screenshot(ImageObject imageObject); - Builder screenshot(ImageObject.Builder imageObject); - Builder screenshot(String screenshot); - Builder softwareVersion(String softwareVersion); - Builder storageRequirements(String storageRequirements); - Builder softwareAddOn(SoftwareApplication softwareApplication); - Builder softwareAddOn(SoftwareApplication.Builder softwareApplication); - Builder softwareHelp(CreativeWork creativeWork); - Builder softwareHelp(CreativeWork.Builder creativeWork); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder applicationCategory(String applicationCategory); + @NotNull Builder applicationSubCategory(String applicationSubCategory); + @NotNull Builder applicationSuite(String applicationSuite); + @NotNull Builder countriesNotSupported(String countriesNotSupported); + @NotNull Builder countriesSupported(String countriesSupported); + @NotNull Builder availableOnDevice(String availableOnDevice); + @NotNull Builder downloadUrl(String downloadUrl); + @NotNull Builder featureList(String featureList); + @NotNull Builder fileFormat(String fileFormat); + @NotNull Builder fileSize(int fileSize); + @NotNull Builder installUrl(String installUrl); + @NotNull Builder memoryRequirements(String memoryRequirements); + @NotNull Builder operatingSystem(String operatingSystem); + @NotNull Builder permissions(String permissions); + @NotNull Builder processorRequirements(String processorRequirements); + @NotNull Builder releaseNotes(String releaseNotes); + @NotNull Builder softwareRequirements(String softwareRequirements); + @NotNull Builder screenshot(ImageObject imageObject); + @NotNull Builder screenshot(ImageObject.Builder imageObject); + @NotNull Builder screenshot(String screenshot); + @NotNull Builder softwareVersion(String softwareVersion); + @NotNull Builder storageRequirements(String storageRequirements); + @NotNull Builder softwareAddOn(SoftwareApplication softwareApplication); + @NotNull Builder softwareAddOn(SoftwareApplication.Builder softwareApplication); + @NotNull Builder softwareHelp(CreativeWork creativeWork); + @NotNull Builder softwareHelp(CreativeWork.Builder creativeWork); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected SoftwareApplication(String applicationCategory, String applicationSubCategory, String applicationSuite, String countriesNotSupported, String countriesSupported, String availableOnDevice, String downloadUrl, String featureList, String fileFormat, Integer fileSize, String installUrl, String memoryRequirements, String operatingSystem, String permissions, String processorRequirements, String releaseNotes, String softwareRequirements, ImageObjectOrString screenshot, String softwareVersion, String storageRequirements, SoftwareApplication softwareAddOn, CreativeWork softwareHelp, 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) { + protected SoftwareApplication(String applicationCategory, String applicationSubCategory, String applicationSuite, String countriesNotSupported, String countriesSupported, String availableOnDevice, String downloadUrl, String featureList, String fileFormat, int fileSize, String installUrl, String memoryRequirements, String operatingSystem, String permissions, String processorRequirements, String releaseNotes, String softwareRequirements, ImageObjectOrString screenshot, String softwareVersion, String storageRequirements, SoftwareApplication softwareAddOn, CreativeWork softwareHelp, 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, int 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); myApplicationCategory = applicationCategory; myApplicationSubCategory = applicationSubCategory; @@ -1652,7 +1656,7 @@ protected SoftwareApplication(String applicationCategory, String applicationSubC private String myDownloadUrl; private String myFeatureList; private String myFileFormat; - private Integer myFileSize; + private int myFileSize; private String myInstallUrl; private String myMemoryRequirements; private String myOperatingSystem; diff --git a/src/main/java/org/schema/SoftwareApplicationBuild.java b/src/main/java/org/schema/SoftwareApplicationBuild.java index 3d496986..b77a8a26 100644 --- a/src/main/java/org/schema/SoftwareApplicationBuild.java +++ b/src/main/java/org/schema/SoftwareApplicationBuild.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Specific build of a software applicaton */ @@ -37,7 +41,7 @@ public Project getProject() { /** * Builder for {@link SoftwareApplicationBuild} */ - public static final class SoftwareApplicationBuildThingBuilder implements Builder { + static final class SoftwareApplicationBuildThingBuilder implements Builder { /** * Creates new {@link SoftwareApplicationBuild} instance. */ @@ -47,152 +51,152 @@ public SoftwareApplicationBuild build() { /** * Software application product this build belongs to. */ - public Builder softwareApplication(SoftwareApplication softwareApplication) { + @NotNull public Builder softwareApplication(SoftwareApplication softwareApplication) { this.softwareApplication = softwareApplication; return this; } /** * Software application product this build belongs to. */ - public Builder softwareApplication(SoftwareApplication.Builder softwareApplication) { + @NotNull public Builder softwareApplication(SoftwareApplication.Builder softwareApplication) { return this.softwareApplication(softwareApplication.build()); } /** * Project this build belongs to. */ - public Builder project(Project project) { + @NotNull public Builder project(Project project) { this.project = project; return this; } /** * Project this build belongs to. */ - public Builder project(Project.Builder project) { + @NotNull public Builder project(Project.Builder project) { return this.project(project.build()); } /** * Type of software application, e.g. "Game, Multimedia". */ - public Builder applicationCategory(String applicationCategory) { + @NotNull public Builder applicationCategory(String applicationCategory) { this.applicationCategory = applicationCategory; return this; } /** * Subcategory of the application, e.g. "Arcade Game". */ - public Builder applicationSubCategory(String applicationSubCategory) { + @NotNull public Builder applicationSubCategory(String applicationSubCategory) { this.applicationSubCategory = applicationSubCategory; return this; } /** * The name of the application suite to which the application belongs (e.g. Excel belongs to Office). */ - public Builder applicationSuite(String applicationSuite) { + @NotNull public Builder applicationSuite(String applicationSuite) { this.applicationSuite = applicationSuite; return this; } /** * Countries for which the application is not supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder countriesNotSupported(String countriesNotSupported) { + @NotNull public Builder countriesNotSupported(String countriesNotSupported) { this.countriesNotSupported = countriesNotSupported; return this; } /** * Countries for which the application is supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder countriesSupported(String countriesSupported) { + @NotNull public Builder countriesSupported(String countriesSupported) { this.countriesSupported = countriesSupported; return this; } /** * Device required to run the application. Used in cases where a specific make/model is required to run the application. */ - public Builder availableOnDevice(String availableOnDevice) { + @NotNull public Builder availableOnDevice(String availableOnDevice) { this.availableOnDevice = availableOnDevice; return this; } /** * If the file can be downloaded, URL to download the binary. */ - public Builder downloadUrl(String downloadUrl) { + @NotNull public Builder downloadUrl(String downloadUrl) { this.downloadUrl = downloadUrl; return this; } /** * Features or modules provided by this application (and possibly required by other applications). */ - public Builder featureList(String featureList) { + @NotNull public Builder featureList(String featureList) { this.featureList = featureList; return this; } /** * MIME format of the binary (e.g. application/zip). */ - public Builder fileFormat(String fileFormat) { + @NotNull public Builder fileFormat(String fileFormat) { this.fileFormat = fileFormat; return this; } /** * Size of the application / package (e.g. 18MB). In the absence of a unit (MB, KB etc.), KB will be assumed. */ - public Builder fileSize(Integer integer) { - this.fileSize = integer; + @NotNull public Builder fileSize(int fileSize) { + this.fileSize = fileSize; return this; } /** * URL at which the app may be installed, if different from the URL of the item. */ - public Builder installUrl(String installUrl) { + @NotNull public Builder installUrl(String installUrl) { this.installUrl = installUrl; return this; } /** * Minimum memory requirements. */ - public Builder memoryRequirements(String memoryRequirements) { + @NotNull public Builder memoryRequirements(String memoryRequirements) { this.memoryRequirements = memoryRequirements; return this; } /** * Operating systems supported (Windows 7, OSX 10.6, Android 1.6). */ - public Builder operatingSystem(String operatingSystem) { + @NotNull public Builder operatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; return this; } /** * Permission(s) required to run the app (for example, a mobile app may require full internet access or may run only on wifi). */ - public Builder permissions(String permissions) { + @NotNull public Builder permissions(String permissions) { this.permissions = permissions; return this; } /** * Processor architecture required to run the application (e.g. IA64). */ - public Builder processorRequirements(String processorRequirements) { + @NotNull public Builder processorRequirements(String processorRequirements) { this.processorRequirements = processorRequirements; return this; } /** * Description of what changed in this version. */ - public Builder releaseNotes(String releaseNotes) { + @NotNull public Builder releaseNotes(String releaseNotes) { this.releaseNotes = releaseNotes; return this; } /** * Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (Examples: DirectX, Java or .NET runtime). */ - public Builder softwareRequirements(String softwareRequirements) { + @NotNull public Builder softwareRequirements(String softwareRequirements) { this.softwareRequirements = softwareRequirements; return this; } /** * A link to a screenshot image of the app. */ - public Builder screenshot(ImageObject imageObject) { + @NotNull public Builder screenshot(ImageObject imageObject) { if (this.screenshot == null) this.screenshot = new ImageObjectOrString(); this.screenshot.setImageObject(imageObject); return this; @@ -200,13 +204,13 @@ public Builder screenshot(ImageObject imageObject) { /** * A link to a screenshot image of the app. */ - public Builder screenshot(ImageObject.Builder imageObject) { + @NotNull public Builder screenshot(ImageObject.Builder imageObject) { return this.screenshot(imageObject.build()); } /** * A link to a screenshot image of the app. */ - public Builder screenshot(String screenshot) { + @NotNull public Builder screenshot(String screenshot) { if (this.screenshot == null) this.screenshot = new ImageObjectOrString(); this.screenshot.setString(screenshot); return this; @@ -214,167 +218,167 @@ public Builder screenshot(String screenshot) { /** * Version of the software instance. */ - public Builder softwareVersion(String softwareVersion) { + @NotNull public Builder softwareVersion(String softwareVersion) { this.softwareVersion = softwareVersion; return this; } /** * Storage requirements (free space required). */ - public Builder storageRequirements(String storageRequirements) { + @NotNull public Builder storageRequirements(String storageRequirements) { this.storageRequirements = storageRequirements; return this; } /** * Additional content for a software application. */ - public Builder softwareAddOn(SoftwareApplication softwareApplication) { + @NotNull public Builder softwareAddOn(SoftwareApplication softwareApplication) { this.softwareAddOn = softwareApplication; return this; } /** * Additional content for a software application. */ - public Builder softwareAddOn(SoftwareApplication.Builder softwareApplication) { + @NotNull public Builder softwareAddOn(SoftwareApplication.Builder softwareApplication) { return this.softwareAddOn(softwareApplication.build()); } /** * Software application help. */ - public Builder softwareHelp(CreativeWork creativeWork) { + @NotNull public Builder softwareHelp(CreativeWork creativeWork) { this.softwareHelp = creativeWork; return this; } /** * Software application help. */ - public Builder softwareHelp(CreativeWork.Builder creativeWork) { + @NotNull public Builder softwareHelp(CreativeWork.Builder creativeWork) { return this.softwareHelp(creativeWork.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -382,13 +386,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -396,20 +400,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -417,13 +421,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -431,40 +435,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -472,13 +476,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -486,13 +490,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -500,13 +504,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -514,21 +518,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -536,7 +540,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -544,7 +548,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -552,7 +556,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -560,7 +564,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -568,13 +572,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -582,101 +586,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -684,13 +688,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -698,35 +702,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -734,13 +738,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -748,53 +752,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -802,13 +806,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -816,127 +820,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -944,7 +948,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -952,7 +956,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -960,7 +964,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -968,20 +972,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -989,13 +993,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -1003,66 +1007,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1070,13 +1074,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1084,40 +1088,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1151,7 +1155,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1186,7 +1190,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1219,7 +1223,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1227,38 +1231,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1276,7 +1280,7 @@ public Builder id(long id) { private String downloadUrl; private String featureList; private String fileFormat; - private Integer fileSize; + private int fileSize; private String installUrl; private String memoryRequirements; private String operatingSystem; @@ -1345,7 +1349,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1363,174 +1367,174 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder softwareApplication(SoftwareApplication softwareApplication); - Builder softwareApplication(SoftwareApplication.Builder softwareApplication); - Builder project(Project project); - Builder project(Project.Builder project); - Builder applicationCategory(String applicationCategory); - Builder applicationSubCategory(String applicationSubCategory); - Builder applicationSuite(String applicationSuite); - Builder countriesNotSupported(String countriesNotSupported); - Builder countriesSupported(String countriesSupported); - Builder availableOnDevice(String availableOnDevice); - Builder downloadUrl(String downloadUrl); - Builder featureList(String featureList); - Builder fileFormat(String fileFormat); - Builder fileSize(Integer integer); - Builder installUrl(String installUrl); - Builder memoryRequirements(String memoryRequirements); - Builder operatingSystem(String operatingSystem); - Builder permissions(String permissions); - Builder processorRequirements(String processorRequirements); - Builder releaseNotes(String releaseNotes); - Builder softwareRequirements(String softwareRequirements); - Builder screenshot(ImageObject imageObject); - Builder screenshot(ImageObject.Builder imageObject); - Builder screenshot(String screenshot); - Builder softwareVersion(String softwareVersion); - Builder storageRequirements(String storageRequirements); - Builder softwareAddOn(SoftwareApplication softwareApplication); - Builder softwareAddOn(SoftwareApplication.Builder softwareApplication); - Builder softwareHelp(CreativeWork creativeWork); - Builder softwareHelp(CreativeWork.Builder creativeWork); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder softwareApplication(SoftwareApplication softwareApplication); + @NotNull Builder softwareApplication(SoftwareApplication.Builder softwareApplication); + @NotNull Builder project(Project project); + @NotNull Builder project(Project.Builder project); + @NotNull Builder applicationCategory(String applicationCategory); + @NotNull Builder applicationSubCategory(String applicationSubCategory); + @NotNull Builder applicationSuite(String applicationSuite); + @NotNull Builder countriesNotSupported(String countriesNotSupported); + @NotNull Builder countriesSupported(String countriesSupported); + @NotNull Builder availableOnDevice(String availableOnDevice); + @NotNull Builder downloadUrl(String downloadUrl); + @NotNull Builder featureList(String featureList); + @NotNull Builder fileFormat(String fileFormat); + @NotNull Builder fileSize(int fileSize); + @NotNull Builder installUrl(String installUrl); + @NotNull Builder memoryRequirements(String memoryRequirements); + @NotNull Builder operatingSystem(String operatingSystem); + @NotNull Builder permissions(String permissions); + @NotNull Builder processorRequirements(String processorRequirements); + @NotNull Builder releaseNotes(String releaseNotes); + @NotNull Builder softwareRequirements(String softwareRequirements); + @NotNull Builder screenshot(ImageObject imageObject); + @NotNull Builder screenshot(ImageObject.Builder imageObject); + @NotNull Builder screenshot(String screenshot); + @NotNull Builder softwareVersion(String softwareVersion); + @NotNull Builder storageRequirements(String storageRequirements); + @NotNull Builder softwareAddOn(SoftwareApplication softwareApplication); + @NotNull Builder softwareAddOn(SoftwareApplication.Builder softwareApplication); + @NotNull Builder softwareHelp(CreativeWork creativeWork); + @NotNull Builder softwareHelp(CreativeWork.Builder creativeWork); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected SoftwareApplicationBuild(SoftwareApplication softwareApplication, Project project, String applicationCategory, String applicationSubCategory, String applicationSuite, String countriesNotSupported, String countriesSupported, String availableOnDevice, String downloadUrl, String featureList, String fileFormat, Integer fileSize, String installUrl, String memoryRequirements, String operatingSystem, String permissions, String processorRequirements, String releaseNotes, String softwareRequirements, ImageObjectOrString screenshot, String softwareVersion, String storageRequirements, SoftwareApplication softwareAddOn, CreativeWork softwareHelp, 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) { + protected SoftwareApplicationBuild(SoftwareApplication softwareApplication, Project project, String applicationCategory, String applicationSubCategory, String applicationSuite, String countriesNotSupported, String countriesSupported, String availableOnDevice, String downloadUrl, String featureList, String fileFormat, int fileSize, String installUrl, String memoryRequirements, String operatingSystem, String permissions, String processorRequirements, String releaseNotes, String softwareRequirements, ImageObjectOrString screenshot, String softwareVersion, String storageRequirements, SoftwareApplication softwareAddOn, CreativeWork softwareHelp, 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, int 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(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); mySoftwareApplication = softwareApplication; myProject = project; diff --git a/src/main/java/org/schema/SoftwareSourceCode.java b/src/main/java/org/schema/SoftwareSourceCode.java index 7a6eaac2..55ef9b42 100644 --- a/src/main/java/org/schema/SoftwareSourceCode.java +++ b/src/main/java/org/schema/SoftwareSourceCode.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Computer programming source code. Example: Full (compile ready) solutions, code snippet samples, scripts, templates. */ @@ -55,7 +59,7 @@ public SoftwareApplication getTargetProduct() { /** * Builder for {@link SoftwareSourceCode} */ - public static final class SoftwareSourceCodeThingBuilder implements Builder { + static final class SoftwareSourceCodeThingBuilder implements Builder { /** * Creates new {@link SoftwareSourceCode} instance. */ @@ -65,174 +69,174 @@ public SoftwareSourceCode build() { /** * Link to the repository where the un-compiled, human readable code and related code is located (SVN, github, CodePlex). */ - public Builder codeRepository(String codeRepository) { + @NotNull public Builder codeRepository(String codeRepository) { this.codeRepository = codeRepository; return this; } /** * The computer programming language. */ - public Builder programmingLanguage(Language language) { + @NotNull public Builder programmingLanguage(Language language) { this.programmingLanguage = language; return this; } /** * The computer programming language. */ - public Builder programmingLanguage(Language.Builder language) { + @NotNull public Builder programmingLanguage(Language.Builder language) { return this.programmingLanguage(language.build()); } /** * Runtime platform or script interpreter dependencies (Example - Java v1, Python2.3, .Net Framework 3.0). */ - public Builder runtimePlatform(String runtimePlatform) { + @NotNull public Builder runtimePlatform(String runtimePlatform) { this.runtimePlatform = runtimePlatform; return this; } /** * Full (compile ready) solution, code snippet, inline code, scripts, template. */ - public Builder codeSampleType(String codeSampleType) { + @NotNull public Builder codeSampleType(String codeSampleType) { this.codeSampleType = codeSampleType; return this; } /** * Target Operating System / Product to which the code applies. If applies to several versions, just the product name can be used. */ - public Builder targetProduct(SoftwareApplication softwareApplication) { + @NotNull public Builder targetProduct(SoftwareApplication softwareApplication) { this.targetProduct = softwareApplication; return this; } /** * Target Operating System / Product to which the code applies. If applies to several versions, just the product name can be used. */ - public Builder targetProduct(SoftwareApplication.Builder softwareApplication) { + @NotNull public Builder targetProduct(SoftwareApplication.Builder softwareApplication) { return this.targetProduct(softwareApplication.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -240,13 +244,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -254,20 +258,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -275,13 +279,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -289,40 +293,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -330,13 +334,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -344,13 +348,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -358,13 +362,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -372,21 +376,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -394,7 +398,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -402,7 +406,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -410,7 +414,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -418,7 +422,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -426,13 +430,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -440,101 +444,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -542,13 +546,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -556,35 +560,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -592,13 +596,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -606,53 +610,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -660,13 +664,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -674,127 +678,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -802,7 +806,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -810,7 +814,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -818,7 +822,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -826,20 +830,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -847,13 +851,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -861,66 +865,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -928,13 +932,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -942,40 +946,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1009,7 +1013,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1044,7 +1048,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1085,38 +1089,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1184,7 +1188,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1202,151 +1206,151 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder codeRepository(String codeRepository); - Builder programmingLanguage(Language language); - Builder programmingLanguage(Language.Builder language); - Builder runtimePlatform(String runtimePlatform); - Builder codeSampleType(String codeSampleType); - Builder targetProduct(SoftwareApplication softwareApplication); - Builder targetProduct(SoftwareApplication.Builder softwareApplication); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder codeRepository(String codeRepository); + @NotNull Builder programmingLanguage(Language language); + @NotNull Builder programmingLanguage(Language.Builder language); + @NotNull Builder runtimePlatform(String runtimePlatform); + @NotNull Builder codeSampleType(String codeSampleType); + @NotNull Builder targetProduct(SoftwareApplication softwareApplication); + @NotNull Builder targetProduct(SoftwareApplication.Builder softwareApplication); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected SoftwareSourceCode(String codeRepository, Language programmingLanguage, String runtimePlatform, String codeSampleType, SoftwareApplication targetProduct, 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) { + protected SoftwareSourceCode(String codeRepository, Language programmingLanguage, String runtimePlatform, String codeSampleType, SoftwareApplication targetProduct, 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, int 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); myCodeRepository = codeRepository; myProgrammingLanguage = programmingLanguage; diff --git a/src/main/java/org/schema/SoldOut.java b/src/main/java/org/schema/SoldOut.java index c6ea1b84..18630ca3 100644 --- a/src/main/java/org/schema/SoldOut.java +++ b/src/main/java/org/schema/SoldOut.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item has sold out. */ @@ -25,7 +29,7 @@ public class SoldOut { /** * Builder for {@link SoldOut} */ - public static final class SoldOutThingBuilder implements Builder { + static final class SoldOutThingBuilder implements Builder { /** * Creates new {@link SoldOut} instance. */ @@ -34,7 +38,7 @@ public SoldOut build() { } } public interface Builder extends ThingBuilder { - + } protected SoldOut() { diff --git a/src/main/java/org/schema/SomeProducts.java b/src/main/java/org/schema/SomeProducts.java index 932332e3..3b1b34c6 100644 --- a/src/main/java/org/schema/SomeProducts.java +++ b/src/main/java/org/schema/SomeProducts.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A placeholder for multiple similar products of the same kind. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -32,7 +36,7 @@ public QuantitativeValue getInventoryLevel() { /** * Builder for {@link SomeProducts} */ - public static final class SomeProductsThingBuilder implements Builder { + static final class SomeProductsThingBuilder implements Builder { /** * Creates new {@link SomeProducts} instance. */ @@ -42,53 +46,53 @@ public SomeProducts build() { /** * The current approximate inventory level for the item or items. */ - public Builder inventoryLevel(QuantitativeValue quantitativeValue) { + @NotNull public Builder inventoryLevel(QuantitativeValue quantitativeValue) { this.inventoryLevel = quantitativeValue; return this; } /** * The current approximate inventory level for the item or items. */ - public Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue) { return this.inventoryLevel(quantitativeValue.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -96,13 +100,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -110,13 +114,13 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -124,13 +128,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -138,7 +142,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -146,20 +150,20 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The color of the product. */ - public Builder color(String color) { + @NotNull public Builder color(String color) { this.color = color; return this; } /** * The depth of the item. */ - public Builder depth(Distance distance) { + @NotNull public Builder depth(Distance distance) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setDistance(distance); return this; @@ -167,13 +171,13 @@ public Builder depth(Distance distance) { /** * The depth of the item. */ - public Builder depth(Distance.Builder distance) { + @NotNull public Builder depth(Distance.Builder distance) { return this.depth(distance.build()); } /** * The depth of the item. */ - public Builder depth(QuantitativeValue quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue quantitativeValue) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setQuantitativeValue(quantitativeValue); return this; @@ -181,41 +185,41 @@ public Builder depth(QuantitativeValue quantitativeValue) { /** * The depth of the item. */ - public Builder depth(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue.Builder quantitativeValue) { return this.depth(quantitativeValue.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -223,13 +227,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -237,78 +241,78 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product product) { this.isAccessoryOrSparePartFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product.Builder product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product.Builder product) { return this.isAccessoryOrSparePartFor(product.build()); } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product product) { + @NotNull public Builder isConsumableFor(Product product) { this.isConsumableFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product.Builder product) { + @NotNull public Builder isConsumableFor(Product.Builder product) { return this.isConsumableFor(product.build()); } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product product) { + @NotNull public Builder isRelatedTo(Product product) { this.isRelatedTo = product; return this; } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product.Builder product) { + @NotNull public Builder isRelatedTo(Product.Builder product) { return this.isRelatedTo(product.build()); } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product product) { + @NotNull public Builder isSimilarTo(Product product) { this.isSimilarTo = product; return this; } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product.Builder product) { + @NotNull public Builder isSimilarTo(Product.Builder product) { return this.isSimilarTo(product.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -316,13 +320,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -330,20 +334,20 @@ public Builder logo(String logo) { /** * The manufacturer of the product. */ - public Builder manufacturer(Organization organization) { + @NotNull public Builder manufacturer(Organization organization) { this.manufacturer = organization; return this; } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization.Builder organization) { + @NotNull public Builder manufacturer(Organization.Builder organization) { return this.manufacturer(organization.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel productModel) { + @NotNull public Builder model(ProductModel productModel) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setProductModel(productModel); return this; @@ -351,13 +355,13 @@ public Builder model(ProductModel productModel) { /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel.Builder productModel) { + @NotNull public Builder model(ProductModel.Builder productModel) { return this.model(productModel.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(String model) { + @NotNull public Builder model(String model) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setString(model); return this; @@ -365,74 +369,74 @@ public Builder model(String model) { /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The product identifier, such as ISBN. For example: <meta itemprop='productID' content='isbn:123-456-789'/>. */ - public Builder productID(String productID) { + @NotNull public Builder productID(String productID) { this.productID = productID; return this; } /** * The release date of a product or product model. This can be used to distinguish the exact variant of a product. */ - public Builder releaseDate(java.util.Date date) { + @NotNull public Builder releaseDate(java.util.Date date) { this.releaseDate = date; return this; } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue quantitativeValue) { this.weight = quantitativeValue; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue.Builder quantitativeValue) { return this.weight(quantitativeValue.build()); } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -440,13 +444,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -454,7 +458,7 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** @@ -463,7 +467,7 @@ public Builder width(QuantitativeValue.Builder quantitativeValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -473,41 +477,41 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * The date of production of the item, e.g. vehicle. */ - public Builder productionDate(java.util.Date date) { + @NotNull public Builder productionDate(java.util.Date date) { this.productionDate = date; return this; } /** * The date the item e.g. vehicle was purchased by the current owner. */ - public Builder purchaseDate(java.util.Date date) { + @NotNull public Builder purchaseDate(java.util.Date date) { this.purchaseDate = date; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -541,7 +545,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -576,7 +580,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -609,7 +613,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -617,38 +621,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -698,83 +702,83 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder inventoryLevel(QuantitativeValue quantitativeValue); - Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder color(String color); - Builder depth(Distance distance); - Builder depth(Distance.Builder distance); - Builder depth(QuantitativeValue quantitativeValue); - Builder depth(QuantitativeValue.Builder quantitativeValue); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder isAccessoryOrSparePartFor(Product product); - Builder isAccessoryOrSparePartFor(Product.Builder product); - Builder isConsumableFor(Product product); - Builder isConsumableFor(Product.Builder product); - Builder isRelatedTo(Product product); - Builder isRelatedTo(Product.Builder product); - Builder isSimilarTo(Product product); - Builder isSimilarTo(Product.Builder product); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder manufacturer(Organization organization); - Builder manufacturer(Organization.Builder organization); - Builder model(ProductModel productModel); - Builder model(ProductModel.Builder productModel); - Builder model(String model); - Builder mpn(String mpn); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder productID(String productID); - Builder releaseDate(java.util.Date date); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sku(String sku); - Builder weight(QuantitativeValue quantitativeValue); - Builder weight(QuantitativeValue.Builder quantitativeValue); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder productionDate(java.util.Date date); - Builder purchaseDate(java.util.Date date); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder inventoryLevel(QuantitativeValue quantitativeValue); + @NotNull Builder inventoryLevel(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder color(String color); + @NotNull Builder depth(Distance distance); + @NotNull Builder depth(Distance.Builder distance); + @NotNull Builder depth(QuantitativeValue quantitativeValue); + @NotNull Builder depth(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder isAccessoryOrSparePartFor(Product product); + @NotNull Builder isAccessoryOrSparePartFor(Product.Builder product); + @NotNull Builder isConsumableFor(Product product); + @NotNull Builder isConsumableFor(Product.Builder product); + @NotNull Builder isRelatedTo(Product product); + @NotNull Builder isRelatedTo(Product.Builder product); + @NotNull Builder isSimilarTo(Product product); + @NotNull Builder isSimilarTo(Product.Builder product); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder manufacturer(Organization organization); + @NotNull Builder manufacturer(Organization.Builder organization); + @NotNull Builder model(ProductModel productModel); + @NotNull Builder model(ProductModel.Builder productModel); + @NotNull Builder model(String model); + @NotNull Builder mpn(String mpn); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder productID(String productID); + @NotNull Builder releaseDate(java.util.Date date); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sku(String sku); + @NotNull Builder weight(QuantitativeValue quantitativeValue); + @NotNull Builder weight(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder productionDate(java.util.Date date); + @NotNull Builder purchaseDate(java.util.Date date); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected SomeProducts(QuantitativeValue inventoryLevel, 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) { diff --git a/src/main/java/org/schema/SoundtrackAlbum.java b/src/main/java/org/schema/SoundtrackAlbum.java index 3089d19e..9fe7e403 100644 --- a/src/main/java/org/schema/SoundtrackAlbum.java +++ b/src/main/java/org/schema/SoundtrackAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * SoundtrackAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class SoundtrackAlbum { /** * Builder for {@link SoundtrackAlbum} */ - public static final class SoundtrackAlbumThingBuilder implements Builder { + static final class SoundtrackAlbumThingBuilder implements Builder { /** * Creates new {@link SoundtrackAlbum} instance. */ @@ -35,7 +39,7 @@ public SoundtrackAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected SoundtrackAlbum() { diff --git a/src/main/java/org/schema/Specialty.java b/src/main/java/org/schema/Specialty.java index a582da7c..2b81856c 100644 --- a/src/main/java/org/schema/Specialty.java +++ b/src/main/java/org/schema/Specialty.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Any branch of a field in which people typically develop specific expertise, usually after significant study, time, and effort. */ @@ -25,7 +29,7 @@ public class Specialty extends Enumeration { /** * Builder for {@link Specialty} */ - public static final class SpecialtyThingBuilder implements Builder { + static final class SpecialtyThingBuilder implements Builder { /** * Creates new {@link Specialty} instance. */ @@ -35,7 +39,7 @@ public Specialty build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -43,13 +47,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -57,27 +61,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -111,7 +115,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -146,7 +150,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -179,7 +183,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -187,38 +191,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -237,22 +241,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Specialty(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/SpeechPathology.java b/src/main/java/org/schema/SpeechPathology.java index 44bbd7f9..ce1fe378 100644 --- a/src/main/java/org/schema/SpeechPathology.java +++ b/src/main/java/org/schema/SpeechPathology.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Speech pathology. */ @@ -25,7 +29,7 @@ public class SpeechPathology { /** * Builder for {@link SpeechPathology} */ - public static final class SpeechPathologyThingBuilder implements Builder { + static final class SpeechPathologyThingBuilder implements Builder { /** * Creates new {@link SpeechPathology} instance. */ @@ -34,7 +38,7 @@ public SpeechPathology build() { } } public interface Builder extends ThingBuilder { - + } protected SpeechPathology() { diff --git a/src/main/java/org/schema/SpokenWordAlbum.java b/src/main/java/org/schema/SpokenWordAlbum.java index 689bf61a..4613ada2 100644 --- a/src/main/java/org/schema/SpokenWordAlbum.java +++ b/src/main/java/org/schema/SpokenWordAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * SpokenWordAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class SpokenWordAlbum { /** * Builder for {@link SpokenWordAlbum} */ - public static final class SpokenWordAlbumThingBuilder implements Builder { + static final class SpokenWordAlbumThingBuilder implements Builder { /** * Creates new {@link SpokenWordAlbum} instance. */ @@ -35,7 +39,7 @@ public SpokenWordAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected SpokenWordAlbum() { diff --git a/src/main/java/org/schema/SportingGoodsStore.java b/src/main/java/org/schema/SportingGoodsStore.java index ed4a76ae..ef7f5dd7 100644 --- a/src/main/java/org/schema/SportingGoodsStore.java +++ b/src/main/java/org/schema/SportingGoodsStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A sporting goods store. */ @@ -25,7 +29,7 @@ public class SportingGoodsStore extends Store { /** * Builder for {@link SportingGoodsStore} */ - public static final class SportingGoodsStoreThingBuilder implements Builder { + static final class SportingGoodsStoreThingBuilder implements Builder { /** * Creates new {@link SportingGoodsStore} instance. */ @@ -35,107 +39,107 @@ public SportingGoodsStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SportsActivityLocation.java b/src/main/java/org/schema/SportsActivityLocation.java index 3730c4ca..e868a781 100644 --- a/src/main/java/org/schema/SportsActivityLocation.java +++ b/src/main/java/org/schema/SportsActivityLocation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A sports location, such as a playing field. */ @@ -25,7 +29,7 @@ public class SportsActivityLocation extends LocalBusiness { /** * Builder for {@link SportsActivityLocation} */ - public static final class SportsActivityLocationThingBuilder implements Builder { + static final class SportsActivityLocationThingBuilder implements Builder { /** * Creates new {@link SportsActivityLocation} instance. */ @@ -35,107 +39,107 @@ public SportsActivityLocation build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SportsClub.java b/src/main/java/org/schema/SportsClub.java index c7232162..ca4f854e 100644 --- a/src/main/java/org/schema/SportsClub.java +++ b/src/main/java/org/schema/SportsClub.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A sports club. */ @@ -25,7 +29,7 @@ public class SportsClub extends SportsActivityLocation { /** * Builder for {@link SportsClub} */ - public static final class SportsClubThingBuilder implements Builder { + static final class SportsClubThingBuilder implements Builder { /** * Creates new {@link SportsClub} instance. */ @@ -35,107 +39,107 @@ public SportsClub build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SportsEvent.java b/src/main/java/org/schema/SportsEvent.java index edadadb6..780c76ec 100644 --- a/src/main/java/org/schema/SportsEvent.java +++ b/src/main/java/org/schema/SportsEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Sports event. */ @@ -43,7 +47,7 @@ public Competitor getCompetitor() { /** * Builder for {@link SportsEvent} */ - public static final class SportsEventThingBuilder implements Builder { + static final class SportsEventThingBuilder implements Builder { /** * Creates new {@link SportsEvent} instance. */ @@ -53,41 +57,41 @@ public SportsEvent build() { /** * The home team in a sports event. */ - public Builder homeTeam(Competitor competitor) { + @NotNull public Builder homeTeam(Competitor competitor) { this.homeTeam = competitor; return this; } /** * The away team in a sports event. */ - public Builder awayTeam(Competitor competitor) { + @NotNull public Builder awayTeam(Competitor competitor) { this.awayTeam = competitor; return this; } /** * A competitor in a sports event. */ - public Builder competitor(Competitor competitor) { + @NotNull public Builder competitor(Competitor competitor) { this.competitor = competitor; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -95,13 +99,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -109,13 +113,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -123,13 +127,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -137,53 +141,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -191,13 +195,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -205,20 +209,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -226,13 +230,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -240,113 +244,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -380,7 +384,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -415,7 +419,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -448,7 +452,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -456,38 +460,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -526,59 +530,59 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder homeTeam(Competitor competitor); - Builder awayTeam(Competitor competitor); - Builder competitor(Competitor competitor); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder homeTeam(Competitor competitor); + @NotNull Builder awayTeam(Competitor competitor); + @NotNull Builder competitor(Competitor competitor); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected SportsEvent(Competitor homeTeam, Competitor awayTeam, Competitor competitor, 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) { diff --git a/src/main/java/org/schema/SportsOrganization.java b/src/main/java/org/schema/SportsOrganization.java index 12725cb0..215bcdb5 100644 --- a/src/main/java/org/schema/SportsOrganization.java +++ b/src/main/java/org/schema/SportsOrganization.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Represents the collection of all sports organizations, including sports teams, governing bodies, and sports associations. */ @@ -31,7 +35,7 @@ public String getSport() { /** * Builder for {@link SportsOrganization} */ - public static final class SportsOrganizationThingBuilder implements Builder { + static final class SportsOrganizationThingBuilder implements Builder { /** * Creates new {@link SportsOrganization} instance. */ @@ -41,47 +45,47 @@ public SportsOrganization build() { /** * A type of sport (e.g. Baseball). */ - public Builder sport(String sport) { + @NotNull public Builder sport(String sport) { this.sport = sport; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -89,13 +93,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -103,147 +107,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -251,13 +255,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -265,20 +269,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -286,13 +290,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -300,13 +304,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -314,13 +318,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -328,33 +332,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -362,13 +366,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -376,100 +380,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -503,7 +507,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -538,7 +542,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -571,7 +575,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -579,38 +583,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -661,79 +665,79 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder sport(String sport); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder sport(String sport); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected SportsOrganization(String sport, 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) { diff --git a/src/main/java/org/schema/SportsTeam.java b/src/main/java/org/schema/SportsTeam.java index 1e4b57a1..ba55fe3c 100644 --- a/src/main/java/org/schema/SportsTeam.java +++ b/src/main/java/org/schema/SportsTeam.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Organization: Sports team. */ @@ -37,7 +41,7 @@ public Person getAthlete() { /** * Builder for {@link SportsTeam} */ - public static final class SportsTeamThingBuilder implements Builder { + static final class SportsTeamThingBuilder implements Builder { /** * Creates new {@link SportsTeam} instance. */ @@ -47,73 +51,73 @@ public SportsTeam build() { /** * A person that acts in a coaching role for a sports team. */ - public Builder coach(Person person) { + @NotNull public Builder coach(Person person) { this.coach = person; return this; } /** * A person that acts in a coaching role for a sports team. */ - public Builder coach(Person.Builder person) { + @NotNull public Builder coach(Person.Builder person) { return this.coach(person.build()); } /** * A person that acts as performing member of a sports team; a player as opposed to a coach. */ - public Builder athlete(Person person) { + @NotNull public Builder athlete(Person person) { this.athlete = person; return this; } /** * A person that acts as performing member of a sports team; a player as opposed to a coach. */ - public Builder athlete(Person.Builder person) { + @NotNull public Builder athlete(Person.Builder person) { return this.athlete(person.build()); } /** * A type of sport (e.g. Baseball). */ - public Builder sport(String sport) { + @NotNull public Builder sport(String sport) { this.sport = sport; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -121,13 +125,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -135,147 +139,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -283,13 +287,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -297,20 +301,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -318,13 +322,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -332,13 +336,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -346,13 +350,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -360,33 +364,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -394,13 +398,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -408,100 +412,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -535,7 +539,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -570,7 +574,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -603,7 +607,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -611,38 +615,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -695,83 +699,83 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder coach(Person person); - Builder coach(Person.Builder person); - Builder athlete(Person person); - Builder athlete(Person.Builder person); - Builder sport(String sport); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder coach(Person person); + @NotNull Builder coach(Person.Builder person); + @NotNull Builder athlete(Person person); + @NotNull Builder athlete(Person.Builder person); + @NotNull Builder sport(String sport); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected SportsTeam(Person coach, Person athlete, String sport, 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) { diff --git a/src/main/java/org/schema/StackExchange.java b/src/main/java/org/schema/StackExchange.java index 3e27a4cc..4130459b 100644 --- a/src/main/java/org/schema/StackExchange.java +++ b/src/main/java/org/schema/StackExchange.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The Question/Answer types were based on the Stack Overflow API. */ @@ -25,7 +29,7 @@ public class StackExchange { /** * Builder for {@link StackExchange} */ - public static final class StackExchangeThingBuilder implements Builder { + static final class StackExchangeThingBuilder implements Builder { /** * Creates new {@link StackExchange} instance. */ @@ -34,7 +38,7 @@ public StackExchange build() { } } public interface Builder extends ThingBuilder { - + } protected StackExchange() { diff --git a/src/main/java/org/schema/StadiumOrArena.java b/src/main/java/org/schema/StadiumOrArena.java index 8df56de8..abe262f4 100644 --- a/src/main/java/org/schema/StadiumOrArena.java +++ b/src/main/java/org/schema/StadiumOrArena.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A stadium. */ @@ -25,7 +29,7 @@ public class StadiumOrArena extends SportsActivityLocation { /** * Builder for {@link StadiumOrArena} */ - public static final class StadiumOrArenaThingBuilder implements Builder { + static final class StadiumOrArenaThingBuilder implements Builder { /** * Creates new {@link StadiumOrArena} instance. */ @@ -35,107 +39,107 @@ public StadiumOrArena build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/State.java b/src/main/java/org/schema/State.java index 892ad7e3..a3d582c4 100644 --- a/src/main/java/org/schema/State.java +++ b/src/main/java/org/schema/State.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A state or province of a country. */ @@ -25,7 +29,7 @@ public class State extends AdministrativeArea { /** * Builder for {@link State} */ - public static final class StateThingBuilder implements Builder { + static final class StateThingBuilder implements Builder { /** * Creates new {@link State} instance. */ @@ -35,66 +39,66 @@ public State build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SteeringPositionValue.java b/src/main/java/org/schema/SteeringPositionValue.java index d686d4bd..1533f44e 100644 --- a/src/main/java/org/schema/SteeringPositionValue.java +++ b/src/main/java/org/schema/SteeringPositionValue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A value indicating a steering position. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class SteeringPositionValue extends QualitativeValue { /** * Builder for {@link SteeringPositionValue} */ - public static final class SteeringPositionValueThingBuilder implements Builder { + static final class SteeringPositionValueThingBuilder implements Builder { /** * Creates new {@link SteeringPositionValue} instance. */ @@ -36,85 +40,85 @@ public SteeringPositionValue build() { /** * This ordering relation for qualitative values indicates that the subject is equal to the object. */ - public Builder equal(QualitativeValue qualitativeValue) { + @NotNull public Builder equal(QualitativeValue qualitativeValue) { this.equal = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is equal to the object. */ - public Builder equal(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder equal(QualitativeValue.Builder qualitativeValue) { return this.equal(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is greater than the object. */ - public Builder greater(QualitativeValue qualitativeValue) { + @NotNull public Builder greater(QualitativeValue qualitativeValue) { this.greater = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is greater than the object. */ - public Builder greater(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder greater(QualitativeValue.Builder qualitativeValue) { return this.greater(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is greater than or equal to the object. */ - public Builder greaterOrEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder greaterOrEqual(QualitativeValue qualitativeValue) { this.greaterOrEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is greater than or equal to the object. */ - public Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue) { return this.greaterOrEqual(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is lesser than the object. */ - public Builder lesser(QualitativeValue qualitativeValue) { + @NotNull public Builder lesser(QualitativeValue qualitativeValue) { this.lesser = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is lesser than the object. */ - public Builder lesser(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lesser(QualitativeValue.Builder qualitativeValue) { return this.lesser(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object. */ - public Builder lesserOrEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder lesserOrEqual(QualitativeValue qualitativeValue) { this.lesserOrEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is lesser than or equal to the object. */ - public Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue) { return this.lesserOrEqual(qualitativeValue.build()); } /** * This ordering relation for qualitative values indicates that the subject is not equal to the object. */ - public Builder nonEqual(QualitativeValue qualitativeValue) { + @NotNull public Builder nonEqual(QualitativeValue qualitativeValue) { this.nonEqual = qualitativeValue; return this; } /** * This ordering relation for qualitative values indicates that the subject is not equal to the object. */ - public Builder nonEqual(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder nonEqual(QualitativeValue.Builder qualitativeValue) { return this.nonEqual(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration enumeration) { + @NotNull public Builder valueReference(Enumeration enumeration) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setEnumeration(enumeration); return this; @@ -122,13 +126,13 @@ public Builder valueReference(Enumeration enumeration) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(Enumeration.Builder enumeration) { + @NotNull public Builder valueReference(Enumeration.Builder enumeration) { return this.valueReference(enumeration.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue propertyValue) { + @NotNull public Builder valueReference(PropertyValue propertyValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setPropertyValue(propertyValue); return this; @@ -136,13 +140,13 @@ public Builder valueReference(PropertyValue propertyValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(PropertyValue.Builder propertyValue) { + @NotNull public Builder valueReference(PropertyValue.Builder propertyValue) { return this.valueReference(propertyValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue qualitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQualitativeValue(qualitativeValue); return this; @@ -150,13 +154,13 @@ public Builder valueReference(QualitativeValue qualitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder valueReference(QualitativeValue.Builder qualitativeValue) { return this.valueReference(qualitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue quantitativeValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setQuantitativeValue(quantitativeValue); return this; @@ -164,13 +168,13 @@ public Builder valueReference(QuantitativeValue quantitativeValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder valueReference(QuantitativeValue.Builder quantitativeValue) { return this.valueReference(quantitativeValue.build()); } /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue structuredValue) { + @NotNull public Builder valueReference(StructuredValue structuredValue) { if (this.valueReference == null) this.valueReference = new EnumerationOrPropertyValueOrQualitativeValueOrQuantitativeValueOrStructuredValue(); this.valueReference.setStructuredValue(structuredValue); return this; @@ -178,7 +182,7 @@ public Builder valueReference(StructuredValue structuredValue) { /** * A pointer to a secondary value that provides additional information on the original value, e.g. a reference temperature. */ - public Builder valueReference(StructuredValue.Builder structuredValue) { + @NotNull public Builder valueReference(StructuredValue.Builder structuredValue) { return this.valueReference(structuredValue.build()); } /** @@ -187,7 +191,7 @@ public Builder valueReference(StructuredValue.Builder structuredValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -197,13 +201,13 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -211,13 +215,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -225,27 +229,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -279,7 +283,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -314,7 +318,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -347,7 +351,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -355,38 +359,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -413,46 +417,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder equal(QualitativeValue qualitativeValue); - Builder equal(QualitativeValue.Builder qualitativeValue); - Builder greater(QualitativeValue qualitativeValue); - Builder greater(QualitativeValue.Builder qualitativeValue); - Builder greaterOrEqual(QualitativeValue qualitativeValue); - Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue); - Builder lesser(QualitativeValue qualitativeValue); - Builder lesser(QualitativeValue.Builder qualitativeValue); - Builder lesserOrEqual(QualitativeValue qualitativeValue); - Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue); - Builder nonEqual(QualitativeValue qualitativeValue); - Builder nonEqual(QualitativeValue.Builder qualitativeValue); - Builder valueReference(Enumeration enumeration); - Builder valueReference(Enumeration.Builder enumeration); - Builder valueReference(PropertyValue propertyValue); - Builder valueReference(PropertyValue.Builder propertyValue); - Builder valueReference(QualitativeValue qualitativeValue); - Builder valueReference(QualitativeValue.Builder qualitativeValue); - Builder valueReference(QuantitativeValue quantitativeValue); - Builder valueReference(QuantitativeValue.Builder quantitativeValue); - Builder valueReference(StructuredValue structuredValue); - Builder valueReference(StructuredValue.Builder structuredValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder equal(QualitativeValue qualitativeValue); + @NotNull Builder equal(QualitativeValue.Builder qualitativeValue); + @NotNull Builder greater(QualitativeValue qualitativeValue); + @NotNull Builder greater(QualitativeValue.Builder qualitativeValue); + @NotNull Builder greaterOrEqual(QualitativeValue qualitativeValue); + @NotNull Builder greaterOrEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lesser(QualitativeValue qualitativeValue); + @NotNull Builder lesser(QualitativeValue.Builder qualitativeValue); + @NotNull Builder lesserOrEqual(QualitativeValue qualitativeValue); + @NotNull Builder lesserOrEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder nonEqual(QualitativeValue qualitativeValue); + @NotNull Builder nonEqual(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(Enumeration enumeration); + @NotNull Builder valueReference(Enumeration.Builder enumeration); + @NotNull Builder valueReference(PropertyValue propertyValue); + @NotNull Builder valueReference(PropertyValue.Builder propertyValue); + @NotNull Builder valueReference(QualitativeValue qualitativeValue); + @NotNull Builder valueReference(QualitativeValue.Builder qualitativeValue); + @NotNull Builder valueReference(QuantitativeValue quantitativeValue); + @NotNull Builder valueReference(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder valueReference(StructuredValue structuredValue); + @NotNull Builder valueReference(StructuredValue.Builder structuredValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Store.java b/src/main/java/org/schema/Store.java index 90cdad5e..915dc3e1 100644 --- a/src/main/java/org/schema/Store.java +++ b/src/main/java/org/schema/Store.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A retail good store. */ @@ -25,7 +29,7 @@ public class Store extends LocalBusiness { /** * Builder for {@link Store} */ - public static final class StoreThingBuilder implements Builder { + static final class StoreThingBuilder implements Builder { /** * Creates new {@link Store} instance. */ @@ -35,107 +39,107 @@ public Store build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/StrengthTraining.java b/src/main/java/org/schema/StrengthTraining.java index ed4d4e44..f7ef7274 100644 --- a/src/main/java/org/schema/StrengthTraining.java +++ b/src/main/java/org/schema/StrengthTraining.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Physical activity that is engaged in to improve muscle and bone strength. Also referred to as resistance training. */ @@ -25,7 +29,7 @@ public class StrengthTraining { /** * Builder for {@link StrengthTraining} */ - public static final class StrengthTrainingThingBuilder implements Builder { + static final class StrengthTrainingThingBuilder implements Builder { /** * Creates new {@link StrengthTraining} instance. */ @@ -34,7 +38,7 @@ public StrengthTraining build() { } } public interface Builder extends ThingBuilder { - + } protected StrengthTraining() { diff --git a/src/main/java/org/schema/IntegerOrString.java b/src/main/java/org/schema/StringOrInt.java similarity index 68% rename from src/main/java/org/schema/IntegerOrString.java rename to src/main/java/org/schema/StringOrInt.java index a2b9bf46..046ce373 100644 --- a/src/main/java/org/schema/IntegerOrString.java +++ b/src/main/java/org/schema/StringOrInt.java @@ -18,22 +18,25 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) -class IntegerOrString { - @com.fasterxml.jackson.annotation.JsonValue +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) +class StringOrInt { + @JsonValue public Object getJsonLdValue() { - if (myInteger != null) return myInteger; if (myString != null) return myString; + if (myInt != null) return myInt; return null; } - public void setInteger(Integer integer) { clear(); myInteger = integer; } - public Integer getInteger() { return myInteger; } - private Integer myInteger; public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } + public void setInt(int value) { clear(); myInt = value; } + public int getInt() { return myInt; } private String myString; + private Integer myInt; private void clear() { - myInteger = null; myString = null; + myInt = null; } } diff --git a/src/main/java/org/schema/StringOrThing.java b/src/main/java/org/schema/StringOrThing.java index 3f231dc7..5aa67ff6 100644 --- a/src/main/java/org/schema/StringOrThing.java +++ b/src/main/java/org/schema/StringOrThing.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class StringOrThing { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myString != null) return myString; if (myThing != null) return myThing; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } - private String myString; public void setThing(Thing thing) { clear(); myThing = thing; } public Thing getThing() { return myThing; } + private String myString; private Thing myThing; private void clear() { myString = null; diff --git a/src/main/java/org/schema/StringOrVehicle.java b/src/main/java/org/schema/StringOrVehicle.java index 1e3621fe..fb28773b 100644 --- a/src/main/java/org/schema/StringOrVehicle.java +++ b/src/main/java/org/schema/StringOrVehicle.java @@ -18,9 +18,12 @@ package org.schema; -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; + +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) class StringOrVehicle { - @com.fasterxml.jackson.annotation.JsonValue + @JsonValue public Object getJsonLdValue() { if (myString != null) return myString; if (myVehicle != null) return myVehicle; @@ -28,9 +31,9 @@ public Object getJsonLdValue() { } public void setString(String value) { clear(); myString = value; } public String getString() { return myString; } - private String myString; public void setVehicle(Vehicle vehicle) { clear(); myVehicle = vehicle; } public Vehicle getVehicle() { return myVehicle; } + private String myString; private Vehicle myVehicle; private void clear() { myString = null; diff --git a/src/main/java/org/schema/StructuredValue.java b/src/main/java/org/schema/StructuredValue.java index c3451672..cf33ef07 100644 --- a/src/main/java/org/schema/StructuredValue.java +++ b/src/main/java/org/schema/StructuredValue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Structured values are used when the value of a property has a more complex structure than simply being a textual value or a reference to another thing. */ @@ -25,7 +29,7 @@ public class StructuredValue extends Intangible { /** * Builder for {@link StructuredValue} */ - public static final class StructuredValueThingBuilder implements Builder { + static final class StructuredValueThingBuilder implements Builder { /** * Creates new {@link StructuredValue} instance. */ @@ -35,21 +39,21 @@ public StructuredValue build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -83,7 +87,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -118,7 +122,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -151,7 +155,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -159,38 +163,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -208,18 +212,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected StructuredValue(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/StudioAlbum.java b/src/main/java/org/schema/StudioAlbum.java index a501543d..e49cf3da 100644 --- a/src/main/java/org/schema/StudioAlbum.java +++ b/src/main/java/org/schema/StudioAlbum.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * StudioAlbum. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class StudioAlbum { /** * Builder for {@link StudioAlbum} */ - public static final class StudioAlbumThingBuilder implements Builder { + static final class StudioAlbumThingBuilder implements Builder { /** * Creates new {@link StudioAlbum} instance. */ @@ -35,7 +39,7 @@ public StudioAlbum build() { } } public interface Builder extends ThingBuilder { - + } protected StudioAlbum() { diff --git a/src/main/java/org/schema/SubscribeAction.java b/src/main/java/org/schema/SubscribeAction.java index f62a35b4..d88c32d2 100644 --- a/src/main/java/org/schema/SubscribeAction.java +++ b/src/main/java/org/schema/SubscribeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of forming a personal connection with someone/something (object) unidirectionally/asymmetrically to get updates pushed to.

Related actions:

  • FollowAction: Unlike FollowAction, SubscribeAction implies that the subscriber acts as a passive agent being constantly/actively pushed for updates.
  • RegisterAction: Unlike RegisterAction, SubscribeAction implies that the agent is interested in continuing receiving updates from the object.
  • JoinAction: Unlike JoinAction, SubscribeAction implies that the agent is interested in continuing receiving updates from the object
. */ @@ -25,7 +29,7 @@ public class SubscribeAction extends InteractAction { /** * Builder for {@link SubscribeAction} */ - public static final class SubscribeActionThingBuilder implements Builder { + static final class SubscribeActionThingBuilder implements Builder { /** * Creates new {@link SubscribeAction} instance. */ @@ -35,7 +39,7 @@ public SubscribeAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SubwayStation.java b/src/main/java/org/schema/SubwayStation.java index 849f88a6..ad89997c 100644 --- a/src/main/java/org/schema/SubwayStation.java +++ b/src/main/java/org/schema/SubwayStation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A subway station. */ @@ -25,7 +29,7 @@ public class SubwayStation extends CivicStructure { /** * Builder for {@link SubwayStation} */ - public static final class SubwayStationThingBuilder implements Builder { + static final class SubwayStationThingBuilder implements Builder { /** * Creates new {@link SubwayStation} instance. */ @@ -35,73 +39,73 @@ public SubwayStation build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/SuggestedAnswer.java b/src/main/java/org/schema/SuggestedAnswer.java index dfa598bd..031371ad 100644 --- a/src/main/java/org/schema/SuggestedAnswer.java +++ b/src/main/java/org/schema/SuggestedAnswer.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An answer (possibly one of several, possibly incorrect) to a Question, e.g. on a Question/Answer site. */ diff --git a/src/main/java/org/schema/SuperficialAnatomy.java b/src/main/java/org/schema/SuperficialAnatomy.java index b8c88efe..32f58cff 100644 --- a/src/main/java/org/schema/SuperficialAnatomy.java +++ b/src/main/java/org/schema/SuperficialAnatomy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Anatomical features that can be observed by sight (without dissection), including the form and proportions of the human body as well as surface landmarks that correspond to deeper subcutaneous structures. Superficial anatomy plays an important role in sports medicine, phlebotomy, and other medical specialties as underlying anatomical structures can be identified through surface palpation. For example, during back surgery, superficial anatomy can be used to palpate and count vertebrae to find the site of incision. Or in phlebotomy, superficial anatomy can be used to locate an underlying vein; for example, the median cubital vein can be located by palpating the borders of the cubital fossa (such as the epicondyles of the humerus) and then looking for the superficial signs of the vein, such as size, prominence, ability to refill after depression, and feel of surrounding tissue support. As another example, in a subluxation (dislocation) of the glenohumeral joint, the bony structure becomes pronounced with the deltoid muscle failing to cover the glenohumeral joint allowing the edges of the scapula to be superficially visible. Here, the superficial anatomy is the visible edges of the scapula, implying the underlying dislocation of the joint (the related anatomical structure). * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -56,7 +60,7 @@ public String getSignificance() { /** * Builder for {@link SuperficialAnatomy} */ - public static final class SuperficialAnatomyThingBuilder implements Builder { + static final class SuperficialAnatomyThingBuilder implements Builder { /** * Creates new {@link SuperficialAnatomy} instance. */ @@ -66,14 +70,14 @@ public SuperficialAnatomy build() { /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Anatomical systems or structures that relate to the superficial anatomy. */ - public Builder relatedAnatomy(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder relatedAnatomy(AnatomicalStructure anatomicalStructure) { if (this.relatedAnatomy == null) this.relatedAnatomy = new AnatomicalStructureOrAnatomicalSystem(); this.relatedAnatomy.setAnatomicalStructure(anatomicalStructure); return this; @@ -81,13 +85,13 @@ public Builder relatedAnatomy(AnatomicalStructure anatomicalStructure) { /** * Anatomical systems or structures that relate to the superficial anatomy. */ - public Builder relatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder relatedAnatomy(AnatomicalStructure.Builder anatomicalStructure) { return this.relatedAnatomy(anatomicalStructure.build()); } /** * Anatomical systems or structures that relate to the superficial anatomy. */ - public Builder relatedAnatomy(AnatomicalSystem anatomicalSystem) { + @NotNull public Builder relatedAnatomy(AnatomicalSystem anatomicalSystem) { if (this.relatedAnatomy == null) this.relatedAnatomy = new AnatomicalStructureOrAnatomicalSystem(); this.relatedAnatomy.setAnatomicalSystem(anatomicalSystem); return this; @@ -95,138 +99,138 @@ public Builder relatedAnatomy(AnatomicalSystem anatomicalSystem) { /** * Anatomical systems or structures that relate to the superficial anatomy. */ - public Builder relatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { + @NotNull public Builder relatedAnatomy(AnatomicalSystem.Builder anatomicalSystem) { return this.relatedAnatomy(anatomicalSystem.build()); } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * The significance associated with the superficial anatomy; as an example, how characteristics of the superficial anatomy can suggest underlying medical conditions or courses of treatment. */ - public Builder significance(String significance) { + @NotNull public Builder significance(String significance) { this.significance = significance; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -260,7 +264,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -328,7 +332,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -336,38 +340,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -396,40 +400,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedPathophysiology(String associatedPathophysiology); - Builder relatedAnatomy(AnatomicalStructure anatomicalStructure); - Builder relatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); - Builder relatedAnatomy(AnatomicalSystem anatomicalSystem); - Builder relatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder significance(String significance); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder relatedAnatomy(AnatomicalStructure anatomicalStructure); + @NotNull Builder relatedAnatomy(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder relatedAnatomy(AnatomicalSystem anatomicalSystem); + @NotNull Builder relatedAnatomy(AnatomicalSystem.Builder anatomicalSystem); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder significance(String significance); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected SuperficialAnatomy(String associatedPathophysiology, AnatomicalStructureOrAnatomicalSystem relatedAnatomy, MedicalCondition relatedCondition, MedicalTherapy relatedTherapy, String significance, 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) { diff --git a/src/main/java/org/schema/Surgical.java b/src/main/java/org/schema/Surgical.java index 6525c588..8b446967 100644 --- a/src/main/java/org/schema/Surgical.java +++ b/src/main/java/org/schema/Surgical.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that pertains to treating diseases, injuries and deformities by manual and instrumental means. */ @@ -25,7 +29,7 @@ public class Surgical { /** * Builder for {@link Surgical} */ - public static final class SurgicalThingBuilder implements Builder { + static final class SurgicalThingBuilder implements Builder { /** * Creates new {@link Surgical} instance. */ @@ -34,7 +38,7 @@ public Surgical build() { } } public interface Builder extends ThingBuilder { - + } protected Surgical() { diff --git a/src/main/java/org/schema/SurgicalProcedure.java b/src/main/java/org/schema/SurgicalProcedure.java index 2b2933fa..5b5b9eea 100644 --- a/src/main/java/org/schema/SurgicalProcedure.java +++ b/src/main/java/org/schema/SurgicalProcedure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A type of medical procedure that involves invasive surgical techniques. */ @@ -25,7 +29,7 @@ public class SurgicalProcedure { /** * Builder for {@link SurgicalProcedure} */ - public static final class SurgicalProcedureThingBuilder implements Builder { + static final class SurgicalProcedureThingBuilder implements Builder { /** * Creates new {@link SurgicalProcedure} instance. */ @@ -34,7 +38,7 @@ public SurgicalProcedure build() { } } public interface Builder extends ThingBuilder { - + } protected SurgicalProcedure() { diff --git a/src/main/java/org/schema/SuspendAction.java b/src/main/java/org/schema/SuspendAction.java index 8350a138..4ebcae1f 100644 --- a/src/main/java/org/schema/SuspendAction.java +++ b/src/main/java/org/schema/SuspendAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of momentarily pausing a device or application (e.g. pause music playback or pause a timer). */ @@ -25,7 +29,7 @@ public class SuspendAction extends ControlAction { /** * Builder for {@link SuspendAction} */ - public static final class SuspendActionThingBuilder implements Builder { + static final class SuspendActionThingBuilder implements Builder { /** * Creates new {@link SuspendAction} instance. */ @@ -35,7 +39,7 @@ public SuspendAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Suspended.java b/src/main/java/org/schema/Suspended.java index 984b3ed7..4e15d997 100644 --- a/src/main/java/org/schema/Suspended.java +++ b/src/main/java/org/schema/Suspended.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Suspended. */ @@ -25,7 +29,7 @@ public class Suspended { /** * Builder for {@link Suspended} */ - public static final class SuspendedThingBuilder implements Builder { + static final class SuspendedThingBuilder implements Builder { /** * Creates new {@link Suspended} instance. */ @@ -34,7 +38,7 @@ public Suspended build() { } } public interface Builder extends ThingBuilder { - + } protected Suspended() { diff --git a/src/main/java/org/schema/Synagogue.java b/src/main/java/org/schema/Synagogue.java index 38de11a8..dc4759e0 100644 --- a/src/main/java/org/schema/Synagogue.java +++ b/src/main/java/org/schema/Synagogue.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A synagogue. */ @@ -25,7 +29,7 @@ public class Synagogue extends PlaceOfWorship { /** * Builder for {@link Synagogue} */ - public static final class SynagogueThingBuilder implements Builder { + static final class SynagogueThingBuilder implements Builder { /** * Creates new {@link Synagogue} instance. */ @@ -35,73 +39,73 @@ public Synagogue build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TVClip.java b/src/main/java/org/schema/TVClip.java index 656cd85e..089d5ca6 100644 --- a/src/main/java/org/schema/TVClip.java +++ b/src/main/java/org/schema/TVClip.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A short TV program or a segment/part of a TV program. */ @@ -25,7 +29,7 @@ public class TVClip extends Clip { /** * Builder for {@link TVClip} */ - public static final class TVClipThingBuilder implements Builder { + static final class TVClipThingBuilder implements Builder { /** * Creates new {@link TVClip} instance. */ @@ -35,40 +39,40 @@ public TVClip build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * Position of the clip within an ordered group of clips. */ - public Builder clipNumber(Position position) { + @NotNull public Builder clipNumber(Position position) { this.clipNumber = position; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -76,13 +80,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -90,154 +94,154 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The episode to which this clip belongs. */ - public Builder partOfEpisode(IsPartOf isPartOf) { + @NotNull public Builder partOfEpisode(IsPartOf isPartOf) { this.partOfEpisode = isPartOf; return this; } /** * The season to which this episode belongs. */ - public Builder partOfSeason(IsPartOf isPartOf) { + @NotNull public Builder partOfSeason(IsPartOf isPartOf) { this.partOfSeason = isPartOf; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -245,13 +249,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -259,20 +263,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -280,13 +284,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -294,40 +298,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -335,13 +339,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -349,13 +353,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -377,21 +381,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -399,7 +403,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -407,7 +411,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -415,7 +419,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -423,7 +427,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -431,13 +435,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -445,101 +449,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -547,13 +551,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -561,35 +565,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -597,13 +601,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -611,53 +615,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -665,13 +669,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -679,127 +683,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -807,7 +811,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -815,7 +819,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -823,7 +827,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -831,20 +835,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -852,13 +856,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -866,66 +870,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -933,13 +937,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -947,40 +951,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1014,7 +1018,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1049,7 +1053,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1082,7 +1086,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1090,38 +1094,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1191,7 +1195,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1209,156 +1213,156 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder clipNumber(Position position); - Builder director(Person person); - Builder director(Person.Builder person); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder partOfEpisode(IsPartOf isPartOf); - Builder partOfSeason(IsPartOf isPartOf); - Builder partOfSeries(IsPartOf isPartOf); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder clipNumber(Position position); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder partOfEpisode(IsPartOf isPartOf); + @NotNull Builder partOfSeason(IsPartOf isPartOf); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/TVEpisode.java b/src/main/java/org/schema/TVEpisode.java index ba546270..c56904f4 100644 --- a/src/main/java/org/schema/TVEpisode.java +++ b/src/main/java/org/schema/TVEpisode.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A TV episode which can be part of a series or season. */ @@ -31,7 +35,7 @@ public LanguageOrString getSubtitleLanguage() { /** * Builder for {@link TVEpisode} */ - public static final class TVEpisodeThingBuilder implements Builder { + static final class TVEpisodeThingBuilder implements Builder { /** * Creates new {@link TVEpisode} instance. */ @@ -41,7 +45,7 @@ public TVEpisode build() { /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(Language language) { + @NotNull public Builder subtitleLanguage(Language language) { if (this.subtitleLanguage == null) this.subtitleLanguage = new LanguageOrString(); this.subtitleLanguage.setLanguage(language); return this; @@ -49,13 +53,13 @@ public Builder subtitleLanguage(Language language) { /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(Language.Builder language) { + @NotNull public Builder subtitleLanguage(Language.Builder language) { return this.subtitleLanguage(language.build()); } /** * Languages in which subtitles/captions are available, in IETF BCP 47 standard format. */ - public Builder subtitleLanguage(String subtitleLanguage) { + @NotNull public Builder subtitleLanguage(String subtitleLanguage) { if (this.subtitleLanguage == null) this.subtitleLanguage = new LanguageOrString(); this.subtitleLanguage.setString(subtitleLanguage); return this; @@ -63,49 +67,49 @@ public Builder subtitleLanguage(String subtitleLanguage) { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * Position of the episode within an ordered group of episodes. */ - public Builder episodeNumber(Integer integer) { - if (this.episodeNumber == null) this.episodeNumber = new IntegerOrString(); - this.episodeNumber.setInteger(integer); + @NotNull public Builder episodeNumber(String episodeNumber) { + if (this.episodeNumber == null) this.episodeNumber = new StringOrInt(); + this.episodeNumber.setString(episodeNumber); return this; } /** * Position of the episode within an ordered group of episodes. */ - public Builder episodeNumber(String episodeNumber) { - if (this.episodeNumber == null) this.episodeNumber = new IntegerOrString(); - this.episodeNumber.setString(episodeNumber); + @NotNull public Builder episodeNumber(int episodeNumber) { + if (this.episodeNumber == null) this.episodeNumber = new StringOrInt(); + this.episodeNumber.setInt(episodeNumber); return this; } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -113,13 +117,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -127,173 +131,173 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The season to which this episode belongs. */ - public Builder partOfSeason(IsPartOf isPartOf) { + @NotNull public Builder partOfSeason(IsPartOf isPartOf) { this.partOfSeason = isPartOf; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -301,13 +305,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -315,20 +319,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -336,13 +340,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -350,40 +354,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -405,13 +409,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -419,13 +423,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -433,21 +437,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -455,7 +459,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -463,7 +467,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -471,7 +475,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -479,7 +483,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -487,13 +491,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -501,101 +505,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -603,13 +607,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -617,35 +621,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -653,13 +657,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -667,53 +671,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -721,13 +725,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -735,127 +739,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -863,7 +867,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -871,7 +875,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -879,7 +883,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -887,20 +891,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -908,13 +912,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -922,66 +926,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -989,13 +993,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1003,40 +1007,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1070,7 +1074,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1105,7 +1109,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1138,7 +1142,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1146,38 +1150,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1187,7 +1191,7 @@ public Builder id(long id) { private LanguageOrString subtitleLanguage; private Person actor; private Person director; - private IntegerOrString episodeNumber; + private StringOrInt episodeNumber; private MusicGroupOrPerson musicBy; private IsPartOf partOfSeason; private IsPartOf partOfSeries; @@ -1249,7 +1253,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1267,163 +1271,163 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder subtitleLanguage(Language language); - Builder subtitleLanguage(Language.Builder language); - Builder subtitleLanguage(String subtitleLanguage); - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder episodeNumber(Integer integer); - Builder episodeNumber(String episodeNumber); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder partOfSeason(IsPartOf isPartOf); - Builder partOfSeries(IsPartOf isPartOf); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder subtitleLanguage(Language language); + @NotNull Builder subtitleLanguage(Language.Builder language); + @NotNull Builder subtitleLanguage(String subtitleLanguage); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder episodeNumber(String episodeNumber); + @NotNull Builder episodeNumber(int episodeNumber); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder partOfSeason(IsPartOf isPartOf); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected TVEpisode(LanguageOrString subtitleLanguage, 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) { + protected TVEpisode(LanguageOrString subtitleLanguage, Person actor, Person director, StringOrInt 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, int 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); mySubtitleLanguage = subtitleLanguage; } diff --git a/src/main/java/org/schema/TVSeason.java b/src/main/java/org/schema/TVSeason.java index a8062366..22516afd 100644 --- a/src/main/java/org/schema/TVSeason.java +++ b/src/main/java/org/schema/TVSeason.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Season dedicated to TV broadcast and associated online delivery. */ @@ -25,7 +29,7 @@ public class TVSeason extends CreativeWorkSeason { /** * Builder for {@link TVSeason} */ - public static final class TVSeasonThingBuilder implements Builder { + static final class TVSeasonThingBuilder implements Builder { /** * Creates new {@link TVSeason} instance. */ @@ -35,230 +39,230 @@ public TVSeason build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An episode of a tv, radio or game media within a series or season. */ - public Builder episode(HasPart hasPart) { + @NotNull public Builder episode(HasPart hasPart) { this.episode = hasPart; return this; } /** * The number of episodes in this season or series. */ - public Builder numberOfEpisodes(Integer integer) { - this.numberOfEpisodes = integer; + @NotNull public Builder numberOfEpisodes(int numberOfEpisodes) { + this.numberOfEpisodes = numberOfEpisodes; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * Position of the season within an ordered group of seasons. */ - public Builder seasonNumber(Integer integer) { - if (this.seasonNumber == null) this.seasonNumber = new IntegerOrString(); - this.seasonNumber.setInteger(integer); + @NotNull public Builder seasonNumber(String seasonNumber) { + if (this.seasonNumber == null) this.seasonNumber = new StringOrInt(); + this.seasonNumber.setString(seasonNumber); return this; } /** * Position of the season within an ordered group of seasons. */ - public Builder seasonNumber(String seasonNumber) { - if (this.seasonNumber == null) this.seasonNumber = new IntegerOrString(); - this.seasonNumber.setString(seasonNumber); + @NotNull public Builder seasonNumber(int seasonNumber) { + if (this.seasonNumber == null) this.seasonNumber = new StringOrInt(); + this.seasonNumber.setInt(seasonNumber); return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -266,13 +270,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -280,20 +284,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -301,13 +305,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -315,40 +319,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -356,13 +360,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -370,13 +374,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -384,13 +388,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -398,21 +402,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -420,7 +424,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -428,7 +432,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -436,7 +440,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -444,7 +448,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -452,13 +456,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -466,101 +470,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -568,13 +572,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -582,35 +586,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -618,13 +622,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -632,53 +636,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -686,13 +690,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -700,127 +704,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -828,7 +832,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -836,7 +840,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -844,7 +848,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -852,20 +856,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -873,13 +877,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -887,66 +891,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -954,13 +958,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -968,40 +972,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1035,7 +1039,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1070,7 +1074,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1103,7 +1107,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1111,38 +1115,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1153,10 +1157,10 @@ public Builder id(long id) { private Person director; private java.util.Date endDate; private HasPart episode; - private Integer numberOfEpisodes; + private int numberOfEpisodes; private IsPartOf partOfSeries; private Organization productionCompany; - private IntegerOrString seasonNumber; + private StringOrInt seasonNumber; private java.util.Date startDate; private VideoObject trailer; private String schemaVersion; @@ -1215,7 +1219,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1233,159 +1237,159 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder endDate(java.util.Date date); - Builder episode(HasPart hasPart); - Builder numberOfEpisodes(Integer integer); - Builder partOfSeries(IsPartOf isPartOf); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder seasonNumber(Integer integer); - Builder seasonNumber(String seasonNumber); - Builder startDate(java.util.Date date); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder episode(HasPart hasPart); + @NotNull Builder numberOfEpisodes(int numberOfEpisodes); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder seasonNumber(String seasonNumber); + @NotNull Builder seasonNumber(int seasonNumber); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + protected TVSeason(Person actor, Person director, java.util.Date endDate, HasPart episode, int numberOfEpisodes, IsPartOf partOfSeries, Organization productionCompany, StringOrInt 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, int 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); } } diff --git a/src/main/java/org/schema/TVSeries.java b/src/main/java/org/schema/TVSeries.java index 0c5ed27f..4612d5b1 100644 --- a/src/main/java/org/schema/TVSeries.java +++ b/src/main/java/org/schema/TVSeries.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * CreativeWorkSeries dedicated to TV broadcast and associated online delivery. */ @@ -49,13 +53,13 @@ public MusicGroupOrPerson getMusicBy() { /** * The number of episodes in this season or series. */ - public Integer getNumberOfEpisodes() { + public int getNumberOfEpisodes() { return myNumberOfEpisodes; } /** * The number of seasons in this series. */ - public Integer getNumberOfSeasons() { + public int getNumberOfSeasons() { return myNumberOfSeasons; } /** @@ -79,7 +83,7 @@ public VideoObject getTrailer() { /** * Builder for {@link TVSeries} */ - public static final class TVSeriesThingBuilder implements Builder { + static final class TVSeriesThingBuilder implements Builder { /** * Creates new {@link TVSeries} instance. */ @@ -89,40 +93,40 @@ public TVSeries build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * An episode of a tv, radio or game media within a series or season. */ - public Builder episode(HasPart hasPart) { + @NotNull public Builder episode(HasPart hasPart) { this.episode = hasPart; return this; } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -130,13 +134,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -144,194 +148,194 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The number of episodes in this season or series. */ - public Builder numberOfEpisodes(Integer integer) { - this.numberOfEpisodes = integer; + @NotNull public Builder numberOfEpisodes(int numberOfEpisodes) { + this.numberOfEpisodes = numberOfEpisodes; return this; } /** * The number of seasons in this series. */ - public Builder numberOfSeasons(Integer integer) { - this.numberOfSeasons = integer; + @NotNull public Builder numberOfSeasons(int numberOfSeasons) { + this.numberOfSeasons = numberOfSeasons; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * A season that is part of the media series. */ - public Builder containsSeason(HasPart hasPart) { + @NotNull public Builder containsSeason(HasPart hasPart) { this.containsSeason = hasPart; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -339,13 +343,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -353,20 +357,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -374,13 +378,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -388,40 +392,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -429,13 +433,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -443,13 +447,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -457,13 +461,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -471,21 +475,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -493,7 +497,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -501,7 +505,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -509,7 +513,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -517,7 +521,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -525,13 +529,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -539,101 +543,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -641,13 +645,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -655,35 +659,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -691,13 +695,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -705,53 +709,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -759,13 +763,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -773,127 +777,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -901,7 +905,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -909,7 +913,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -917,7 +921,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -925,20 +929,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -946,13 +950,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -960,66 +964,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1027,13 +1031,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1041,40 +1045,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1108,7 +1112,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1143,7 +1147,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1176,7 +1180,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1184,38 +1188,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1226,8 +1230,8 @@ public Builder id(long id) { private Person director; private HasPart episode; private MusicGroupOrPerson musicBy; - private Integer numberOfEpisodes; - private Integer numberOfSeasons; + private int numberOfEpisodes; + private int numberOfSeasons; private Organization productionCompany; private HasPart containsSeason; private VideoObject trailer; @@ -1289,7 +1293,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1307,162 +1311,162 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder episode(HasPart hasPart); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder numberOfEpisodes(Integer integer); - Builder numberOfSeasons(Integer integer); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder containsSeason(HasPart hasPart); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder endDate(java.util.Date date); - Builder startDate(java.util.Date date); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder episode(HasPart hasPart); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder numberOfEpisodes(int numberOfEpisodes); + @NotNull Builder numberOfSeasons(int numberOfSeasons); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder containsSeason(HasPart hasPart); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected TVSeries(Person actor, Person director, HasPart episode, MusicGroupOrPerson musicBy, Integer numberOfEpisodes, Integer numberOfSeasons, Organization productionCompany, HasPart containsSeason, VideoObject trailer, 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) { + protected TVSeries(Person actor, Person director, HasPart episode, MusicGroupOrPerson musicBy, int numberOfEpisodes, int numberOfSeasons, Organization productionCompany, HasPart containsSeason, VideoObject trailer, 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, int 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); myActor = actor; myDirector = director; @@ -1478,8 +1482,8 @@ protected TVSeries(Person actor, Person director, HasPart episode, MusicGroupOrP private Person myDirector; private HasPart myEpisode; private MusicGroupOrPerson myMusicBy; - private Integer myNumberOfEpisodes; - private Integer myNumberOfSeasons; + private int myNumberOfEpisodes; + private int myNumberOfSeasons; private Organization myProductionCompany; private HasPart myContainsSeason; private VideoObject myTrailer; diff --git a/src/main/java/org/schema/Table.java b/src/main/java/org/schema/Table.java index b9f53022..8d0ca2a6 100644 --- a/src/main/java/org/schema/Table.java +++ b/src/main/java/org/schema/Table.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A table on a Web page. */ @@ -25,7 +29,7 @@ public class Table extends WebPageElement { /** * Builder for {@link Table} */ - public static final class TableThingBuilder implements Builder { + static final class TableThingBuilder implements Builder { /** * Creates new {@link Table} instance. */ @@ -35,127 +39,127 @@ public Table build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/TakeAction.java b/src/main/java/org/schema/TakeAction.java index 80f42307..addccbd5 100644 --- a/src/main/java/org/schema/TakeAction.java +++ b/src/main/java/org/schema/TakeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of gaining ownership of an object from an origin. Reciprocal of GiveAction.

Related actions:

  • GiveAction: The reciprocal of TakeAction.
  • ReceiveAction: Unlike ReceiveAction, TakeAction implies that ownership has been transfered
. */ @@ -25,7 +29,7 @@ public class TakeAction extends TransferAction { /** * Builder for {@link TakeAction} */ - public static final class TakeActionThingBuilder implements Builder { + static final class TakeActionThingBuilder implements Builder { /** * Creates new {@link TakeAction} instance. */ @@ -35,33 +39,33 @@ public TakeAction build() { /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -69,13 +73,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -83,7 +87,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -91,7 +95,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -100,67 +104,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -194,7 +198,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -229,7 +233,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -270,38 +274,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -327,34 +331,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TattooParlor.java b/src/main/java/org/schema/TattooParlor.java index eea64fa7..d6de511b 100644 --- a/src/main/java/org/schema/TattooParlor.java +++ b/src/main/java/org/schema/TattooParlor.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A tattoo parlor. */ @@ -25,7 +29,7 @@ public class TattooParlor extends HealthAndBeautyBusiness { /** * Builder for {@link TattooParlor} */ - public static final class TattooParlorThingBuilder implements Builder { + static final class TattooParlorThingBuilder implements Builder { /** * Creates new {@link TattooParlor} instance. */ @@ -35,107 +39,107 @@ public TattooParlor build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Taxi.java b/src/main/java/org/schema/Taxi.java index e4b96192..7d6cc7c5 100644 --- a/src/main/java/org/schema/Taxi.java +++ b/src/main/java/org/schema/Taxi.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A taxi. */ @@ -25,7 +29,7 @@ public class Taxi extends Service { /** * Builder for {@link Taxi} */ - public static final class TaxiThingBuilder implements Builder { + static final class TaxiThingBuilder implements Builder { /** * Creates new {@link Taxi} instance. */ @@ -35,79 +39,79 @@ public Taxi build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel serviceChannel) { this.availableChannel = serviceChannel; return this; } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel.Builder serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel.Builder serviceChannel) { return this.availableChannel(serviceChannel.build()); } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing thing) { + @NotNull public Builder serviceOutput(Thing thing) { this.serviceOutput = thing; return this; } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing.Builder thing) { + @NotNull public Builder serviceOutput(Thing.Builder thing) { return this.serviceOutput(thing.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea administrativeArea) { this.serviceArea = administrativeArea; return this; } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { return this.serviceArea(administrativeArea.build()); } /** * The type of service being offered, e.g. veterans' benefits, emergency relief, etc. */ - public Builder serviceType(String serviceType) { + @NotNull public Builder serviceType(String serviceType) { this.serviceType = serviceType; return this; } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -115,13 +119,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -129,27 +133,27 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -183,7 +187,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -218,7 +222,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -251,7 +255,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -259,38 +263,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -315,33 +319,33 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder availableChannel(ServiceChannel serviceChannel); - Builder availableChannel(ServiceChannel.Builder serviceChannel); - Builder serviceOutput(Thing thing); - Builder serviceOutput(Thing.Builder thing); - Builder review(Review review); - Builder review(Review.Builder review); - Builder serviceArea(AdministrativeArea administrativeArea); - Builder serviceArea(AdministrativeArea.Builder administrativeArea); - Builder serviceType(String serviceType); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder availableChannel(ServiceChannel serviceChannel); + @NotNull Builder availableChannel(ServiceChannel.Builder serviceChannel); + @NotNull Builder serviceOutput(Thing thing); + @NotNull Builder serviceOutput(Thing.Builder thing); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder serviceArea(AdministrativeArea administrativeArea); + @NotNull Builder serviceArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder serviceType(String serviceType); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TaxiReservation.java b/src/main/java/org/schema/TaxiReservation.java index f4d5d792..ff8397c5 100644 --- a/src/main/java/org/schema/TaxiReservation.java +++ b/src/main/java/org/schema/TaxiReservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservation for a taxi.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use http://schema.org/Offer. */ @@ -25,7 +29,7 @@ public class TaxiReservation extends Reservation { /** * Number of people the reservation should accommodate. */ - public IntegerOrQuantitativeValue getPartySize() { + public QuantitativeValueOrInt getPartySize() { return myPartySize; } /** @@ -37,14 +41,14 @@ public Place getPickupLocation() { /** * When a taxi will pickup a passenger or a rental car can be picked up. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getPickupTime() { return myPickupTime; } /** * Builder for {@link TaxiReservation} */ - public static final class TaxiReservationThingBuilder implements Builder { + static final class TaxiReservationThingBuilder implements Builder { /** * Creates new {@link TaxiReservation} instance. */ @@ -54,82 +58,82 @@ public TaxiReservation build() { /** * Number of people the reservation should accommodate. */ - public Builder partySize(Integer integer) { - if (this.partySize == null) this.partySize = new IntegerOrQuantitativeValue(); - this.partySize.setInteger(integer); + @NotNull public Builder partySize(QuantitativeValue quantitativeValue) { + if (this.partySize == null) this.partySize = new QuantitativeValueOrInt(); + this.partySize.setQuantitativeValue(quantitativeValue); return this; } /** * Number of people the reservation should accommodate. */ - public Builder partySize(QuantitativeValue quantitativeValue) { - if (this.partySize == null) this.partySize = new IntegerOrQuantitativeValue(); - this.partySize.setQuantitativeValue(quantitativeValue); - return this; + @NotNull public Builder partySize(QuantitativeValue.Builder quantitativeValue) { + return this.partySize(quantitativeValue.build()); } /** * Number of people the reservation should accommodate. */ - public Builder partySize(QuantitativeValue.Builder quantitativeValue) { - return this.partySize(quantitativeValue.build()); + @NotNull public Builder partySize(int partySize) { + if (this.partySize == null) this.partySize = new QuantitativeValueOrInt(); + this.partySize.setInt(partySize); + return this; } /** * Where a taxi will pick up a passenger or a rental car can be picked up. */ - public Builder pickupLocation(Place place) { + @NotNull public Builder pickupLocation(Place place) { this.pickupLocation = place; return this; } /** * Where a taxi will pick up a passenger or a rental car can be picked up. */ - public Builder pickupLocation(Place.Builder place) { + @NotNull public Builder pickupLocation(Place.Builder place) { return this.pickupLocation(place.build()); } /** * When a taxi will pickup a passenger or a rental car can be picked up. */ - public Builder pickupTime(java.util.Date date) { + @NotNull public Builder pickupTime(java.util.Date date) { this.pickupTime = date; return this; } /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -137,13 +141,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -151,13 +155,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -165,13 +169,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -179,53 +183,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -233,7 +237,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -241,13 +245,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -255,14 +259,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -270,13 +274,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -284,27 +288,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -338,7 +342,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -373,7 +377,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -406,7 +410,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -414,45 +418,45 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } public Builder id(long id) { return id(Long.toString(id)); } - private IntegerOrQuantitativeValue partySize; + private QuantitativeValueOrInt partySize; private Place pickupLocation; private java.util.Date pickupTime; private String reservationId; @@ -478,61 +482,61 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder partySize(Integer integer); - Builder partySize(QuantitativeValue quantitativeValue); - Builder partySize(QuantitativeValue.Builder quantitativeValue); - Builder pickupLocation(Place place); - Builder pickupLocation(Place.Builder place); - Builder pickupTime(java.util.Date date); - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder partySize(QuantitativeValue quantitativeValue); + @NotNull Builder partySize(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder partySize(int partySize); + @NotNull Builder pickupLocation(Place place); + @NotNull Builder pickupLocation(Place.Builder place); + @NotNull Builder pickupTime(java.util.Date date); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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(QuantitativeValueOrInt 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) { 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; } - private IntegerOrQuantitativeValue myPartySize; + private QuantitativeValueOrInt 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 bee0168d..69ffa076 100644 --- a/src/main/java/org/schema/TaxiService.java +++ b/src/main/java/org/schema/TaxiService.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A service for a vehicle for hire with a driver for local travel. Fares are usually calculated based on distance traveled. */ @@ -25,7 +29,7 @@ public class TaxiService extends Service { /** * Builder for {@link TaxiService} */ - public static final class TaxiServiceThingBuilder implements Builder { + static final class TaxiServiceThingBuilder implements Builder { /** * Creates new {@link TaxiService} instance. */ @@ -35,79 +39,79 @@ public TaxiService build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel serviceChannel) { this.availableChannel = serviceChannel; return this; } /** * A means of accessing the service (e.g. a phone bank, a web site, a location, etc.). */ - public Builder availableChannel(ServiceChannel.Builder serviceChannel) { + @NotNull public Builder availableChannel(ServiceChannel.Builder serviceChannel) { return this.availableChannel(serviceChannel.build()); } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing thing) { + @NotNull public Builder serviceOutput(Thing thing) { this.serviceOutput = thing; return this; } /** * The tangible thing generated by the service, e.g. a passport, permit, etc. */ - public Builder serviceOutput(Thing.Builder thing) { + @NotNull public Builder serviceOutput(Thing.Builder thing) { return this.serviceOutput(thing.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea administrativeArea) { this.serviceArea = administrativeArea; return this; } /** * The geographic area where the service is provided. */ - public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { + @NotNull public Builder serviceArea(AdministrativeArea.Builder administrativeArea) { return this.serviceArea(administrativeArea.build()); } /** * The type of service being offered, e.g. veterans' benefits, emergency relief, etc. */ - public Builder serviceType(String serviceType) { + @NotNull public Builder serviceType(String serviceType) { this.serviceType = serviceType; return this; } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -115,13 +119,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -129,27 +133,27 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -183,7 +187,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -218,7 +222,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -251,7 +255,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -259,38 +263,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -315,33 +319,33 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder availableChannel(ServiceChannel serviceChannel); - Builder availableChannel(ServiceChannel.Builder serviceChannel); - Builder serviceOutput(Thing thing); - Builder serviceOutput(Thing.Builder thing); - Builder review(Review review); - Builder review(Review.Builder review); - Builder serviceArea(AdministrativeArea administrativeArea); - Builder serviceArea(AdministrativeArea.Builder administrativeArea); - Builder serviceType(String serviceType); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder availableChannel(ServiceChannel serviceChannel); + @NotNull Builder availableChannel(ServiceChannel.Builder serviceChannel); + @NotNull Builder serviceOutput(Thing thing); + @NotNull Builder serviceOutput(Thing.Builder thing); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder serviceArea(AdministrativeArea administrativeArea); + @NotNull Builder serviceArea(AdministrativeArea.Builder administrativeArea); + @NotNull Builder serviceType(String serviceType); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TaxiStand.java b/src/main/java/org/schema/TaxiStand.java index cc81ee79..036a28f8 100644 --- a/src/main/java/org/schema/TaxiStand.java +++ b/src/main/java/org/schema/TaxiStand.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A taxi stand. */ @@ -25,7 +29,7 @@ public class TaxiStand extends CivicStructure { /** * Builder for {@link TaxiStand} */ - public static final class TaxiStandThingBuilder implements Builder { + static final class TaxiStandThingBuilder implements Builder { /** * Creates new {@link TaxiStand} instance. */ @@ -35,73 +39,73 @@ public TaxiStand build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TaxiVehicleUsage.java b/src/main/java/org/schema/TaxiVehicleUsage.java index 9dbd554f..6d7df33a 100644 --- a/src/main/java/org/schema/TaxiVehicleUsage.java +++ b/src/main/java/org/schema/TaxiVehicleUsage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates the usage of the car as a taxi. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#Automotive_Ontology_Working_Group @@ -26,7 +30,7 @@ public class TaxiVehicleUsage { /** * Builder for {@link TaxiVehicleUsage} */ - public static final class TaxiVehicleUsageThingBuilder implements Builder { + static final class TaxiVehicleUsageThingBuilder implements Builder { /** * Creates new {@link TaxiVehicleUsage} instance. */ @@ -35,7 +39,7 @@ public TaxiVehicleUsage build() { } } public interface Builder extends ThingBuilder { - + } protected TaxiVehicleUsage() { diff --git a/src/main/java/org/schema/TechArticle.java b/src/main/java/org/schema/TechArticle.java index dcaa9314..11fd5075 100644 --- a/src/main/java/org/schema/TechArticle.java +++ b/src/main/java/org/schema/TechArticle.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A technical article - Example: How-to (task) topics, step-by-step, procedural troubleshooting, specifications, etc. */ @@ -37,7 +41,7 @@ public String getProficiencyLevel() { /** * Builder for {@link TechArticle} */ - public static final class TechArticleThingBuilder implements Builder { + static final class TechArticleThingBuilder implements Builder { /** * Creates new {@link TechArticle} instance. */ @@ -47,201 +51,201 @@ public TechArticle build() { /** * Prerequisites needed to fulfill steps in article. */ - public Builder dependencies(String dependencies) { + @NotNull public Builder dependencies(String dependencies) { this.dependencies = dependencies; return this; } /** * Proficiency needed for this content; expected values: 'Beginner', 'Expert'. */ - public Builder proficiencyLevel(String proficiencyLevel) { + @NotNull public Builder proficiencyLevel(String proficiencyLevel) { this.proficiencyLevel = proficiencyLevel; return this; } /** * The actual body of the article. */ - public Builder articleBody(String articleBody) { + @NotNull public Builder articleBody(String articleBody) { this.articleBody = articleBody; return this; } /** * Articles may belong to one or more 'sections' in a magazine or newspaper, such as Sports, Lifestyle, etc. */ - public Builder articleSection(String articleSection) { + @NotNull public Builder articleSection(String articleSection) { this.articleSection = articleSection; return this; } /** * The number of words in the text of the Article. */ - public Builder wordCount(Integer integer) { - this.wordCount = integer; + @NotNull public Builder wordCount(int wordCount) { + this.wordCount = wordCount; return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(Integer integer) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setInteger(integer); + @NotNull public Builder pageEnd(String pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setString(pageEnd); return this; } /** * The page on which the work ends; for example "138" or "xvi". */ - public Builder pageEnd(String pageEnd) { - if (this.pageEnd == null) this.pageEnd = new IntegerOrString(); - this.pageEnd.setString(pageEnd); + @NotNull public Builder pageEnd(int pageEnd) { + if (this.pageEnd == null) this.pageEnd = new StringOrInt(); + this.pageEnd.setInt(pageEnd); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(Integer integer) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setInteger(integer); + @NotNull public Builder pageStart(String pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setString(pageStart); return this; } /** * The page on which the work starts; for example "135" or "xiii". */ - public Builder pageStart(String pageStart) { - if (this.pageStart == null) this.pageStart = new IntegerOrString(); - this.pageStart.setString(pageStart); + @NotNull public Builder pageStart(int pageStart) { + if (this.pageStart == null) this.pageStart = new StringOrInt(); + this.pageStart.setInt(pageStart); return this; } /** * Any description of pages that is not separated into pageStart and pageEnd; for example, "1-6, 9, 55" or "10-12, 46-49". */ - public Builder pagination(String pagination) { + @NotNull public Builder pagination(String pagination) { this.pagination = pagination; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -249,13 +253,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -263,20 +267,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -284,13 +288,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -298,40 +302,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -339,13 +343,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -353,13 +357,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -367,13 +371,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -381,21 +385,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -403,7 +407,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -411,7 +415,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -419,7 +423,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -435,13 +439,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -449,101 +453,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -551,13 +555,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -565,35 +569,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -601,13 +605,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -615,53 +619,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -669,13 +673,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -683,127 +687,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -811,7 +815,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -819,7 +823,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -827,7 +831,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -835,20 +839,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -856,13 +860,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -870,66 +874,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -937,13 +941,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -951,40 +955,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1018,7 +1022,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1053,7 +1057,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1086,7 +1090,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1094,38 +1098,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1136,9 +1140,9 @@ public Builder id(long id) { private String proficiencyLevel; private String articleBody; private String articleSection; - private Integer wordCount; - private IntegerOrString pageEnd; - private IntegerOrString pageStart; + private int wordCount; + private StringOrInt pageEnd; + private StringOrInt pageStart; private String pagination; private String schemaVersion; private Thing about; @@ -1196,7 +1200,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1214,154 +1218,154 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder dependencies(String dependencies); - Builder proficiencyLevel(String proficiencyLevel); - Builder articleBody(String articleBody); - Builder articleSection(String articleSection); - Builder wordCount(Integer integer); - Builder pageEnd(Integer integer); - Builder pageEnd(String pageEnd); - Builder pageStart(Integer integer); - Builder pageStart(String pageStart); - Builder pagination(String pagination); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder dependencies(String dependencies); + @NotNull Builder proficiencyLevel(String proficiencyLevel); + @NotNull Builder articleBody(String articleBody); + @NotNull Builder articleSection(String articleSection); + @NotNull Builder wordCount(int wordCount); + @NotNull Builder pageEnd(String pageEnd); + @NotNull Builder pageEnd(int pageEnd); + @NotNull Builder pageStart(String pageStart); + @NotNull Builder pageStart(int pageStart); + @NotNull Builder pagination(String pagination); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected TechArticle(String dependencies, String proficiencyLevel, 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) { + protected TechArticle(String dependencies, String proficiencyLevel, String articleBody, String articleSection, int wordCount, StringOrInt pageEnd, StringOrInt 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, int 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); myDependencies = dependencies; myProficiencyLevel = proficiencyLevel; diff --git a/src/main/java/org/schema/TelevisionChannel.java b/src/main/java/org/schema/TelevisionChannel.java index e85aafa0..aa0635b1 100644 --- a/src/main/java/org/schema/TelevisionChannel.java +++ b/src/main/java/org/schema/TelevisionChannel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A unique instance of a television BroadcastService on a CableOrSatelliteService lineup. */ @@ -25,7 +29,7 @@ public class TelevisionChannel extends BroadcastChannel { /** * Builder for {@link TelevisionChannel} */ - public static final class TelevisionChannelThingBuilder implements Builder { + static final class TelevisionChannelThingBuilder implements Builder { /** * Creates new {@link TelevisionChannel} instance. */ @@ -35,61 +39,61 @@ public TelevisionChannel build() { /** * The unique address by which the BroadcastService can be identified in a provider lineup. In US, this is typically a number. */ - public Builder broadcastChannelId(String broadcastChannelId) { + @NotNull public Builder broadcastChannelId(String broadcastChannelId) { this.broadcastChannelId = broadcastChannelId; return this; } /** * The CableOrSatelliteService offering the channel. */ - public Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService) { + @NotNull public Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService) { this.inBroadcastLineup = cableOrSatelliteService; return this; } /** * The CableOrSatelliteService offering the channel. */ - public Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService) { + @NotNull public Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService) { return this.inBroadcastLineup(cableOrSatelliteService.build()); } /** * The type of service required to have access to the channel (e.g. Standard or Premium). */ - public Builder broadcastServiceTier(String broadcastServiceTier) { + @NotNull public Builder broadcastServiceTier(String broadcastServiceTier) { this.broadcastServiceTier = broadcastServiceTier; return this; } /** * The BroadcastService offered on this channel. */ - public Builder providesBroadcastService(BroadcastService broadcastService) { + @NotNull public Builder providesBroadcastService(BroadcastService broadcastService) { this.providesBroadcastService = broadcastService; return this; } /** * The BroadcastService offered on this channel. */ - public Builder providesBroadcastService(BroadcastService.Builder broadcastService) { + @NotNull public Builder providesBroadcastService(BroadcastService.Builder broadcastService) { return this.providesBroadcastService(broadcastService.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -123,7 +127,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -158,7 +162,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -191,7 +195,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -199,38 +203,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -252,24 +256,24 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder broadcastChannelId(String broadcastChannelId); - Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService); - Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService); - Builder broadcastServiceTier(String broadcastServiceTier); - Builder providesBroadcastService(BroadcastService broadcastService); - Builder providesBroadcastService(BroadcastService.Builder broadcastService); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder broadcastChannelId(String broadcastChannelId); + @NotNull Builder inBroadcastLineup(CableOrSatelliteService cableOrSatelliteService); + @NotNull Builder inBroadcastLineup(CableOrSatelliteService.Builder cableOrSatelliteService); + @NotNull Builder broadcastServiceTier(String broadcastServiceTier); + @NotNull Builder providesBroadcastService(BroadcastService broadcastService); + @NotNull Builder providesBroadcastService(BroadcastService.Builder broadcastService); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TelevisionStation.java b/src/main/java/org/schema/TelevisionStation.java index cc9f389f..6768cab1 100644 --- a/src/main/java/org/schema/TelevisionStation.java +++ b/src/main/java/org/schema/TelevisionStation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A television station. */ @@ -31,7 +35,7 @@ public String getVideoFormat() { /** * Builder for {@link TelevisionStation} */ - public static final class TelevisionStationThingBuilder implements Builder { + static final class TelevisionStationThingBuilder implements Builder { /** * Creates new {@link TelevisionStation} instance. */ @@ -41,114 +45,114 @@ public TelevisionStation build() { /** * The type of screening or video broadcast used (e.g. IMAX, 3D, SD, HD, etc.). */ - public Builder videoFormat(String videoFormat) { + @NotNull public Builder videoFormat(String videoFormat) { this.videoFormat = videoFormat; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -156,13 +160,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -170,27 +174,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -198,13 +202,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -212,7 +216,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -220,13 +224,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -234,20 +238,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -255,13 +259,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -269,26 +273,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -298,7 +302,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -308,27 +312,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -362,7 +366,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -397,7 +401,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -430,7 +434,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -438,38 +442,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -508,57 +512,57 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder videoFormat(String videoFormat); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder videoFormat(String videoFormat); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected TelevisionStation(String videoFormat, 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) { diff --git a/src/main/java/org/schema/TennisComplex.java b/src/main/java/org/schema/TennisComplex.java index f28fc045..e4d461ac 100644 --- a/src/main/java/org/schema/TennisComplex.java +++ b/src/main/java/org/schema/TennisComplex.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A tennis complex. */ @@ -25,7 +29,7 @@ public class TennisComplex extends SportsActivityLocation { /** * Builder for {@link TennisComplex} */ - public static final class TennisComplexThingBuilder implements Builder { + static final class TennisComplexThingBuilder implements Builder { /** * Creates new {@link TennisComplex} instance. */ @@ -35,107 +39,107 @@ public TennisComplex build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Terminated.java b/src/main/java/org/schema/Terminated.java index ec31b74a..69d4cbb9 100644 --- a/src/main/java/org/schema/Terminated.java +++ b/src/main/java/org/schema/Terminated.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Terminated. */ @@ -25,7 +29,7 @@ public class Terminated { /** * Builder for {@link Terminated} */ - public static final class TerminatedThingBuilder implements Builder { + static final class TerminatedThingBuilder implements Builder { /** * Creates new {@link Terminated} instance. */ @@ -34,7 +38,7 @@ public Terminated build() { } } public interface Builder extends ThingBuilder { - + } protected Terminated() { diff --git a/src/main/java/org/schema/TheaterEvent.java b/src/main/java/org/schema/TheaterEvent.java index 2128975b..deb4ec84 100644 --- a/src/main/java/org/schema/TheaterEvent.java +++ b/src/main/java/org/schema/TheaterEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Theater performance. */ @@ -25,7 +29,7 @@ public class TheaterEvent extends Event { /** * Builder for {@link TheaterEvent} */ - public static final class TheaterEventThingBuilder implements Builder { + static final class TheaterEventThingBuilder implements Builder { /** * Creates new {@link TheaterEvent} instance. */ @@ -35,20 +39,20 @@ public TheaterEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TheaterGroup.java b/src/main/java/org/schema/TheaterGroup.java index d34233a3..733c2662 100644 --- a/src/main/java/org/schema/TheaterGroup.java +++ b/src/main/java/org/schema/TheaterGroup.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A theater group or company, for example, the Royal Shakespeare Company or Druid Theatre. */ @@ -25,7 +29,7 @@ public class TheaterGroup extends PerformingGroup { /** * Builder for {@link TheaterGroup} */ - public static final class TheaterGroupThingBuilder implements Builder { + static final class TheaterGroupThingBuilder implements Builder { /** * Creates new {@link TheaterGroup} instance. */ @@ -35,40 +39,40 @@ public TheaterGroup build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -76,13 +80,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -90,147 +94,147 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint contactPoint) { + @NotNull public Builder contactPoint(ContactPoint contactPoint) { this.contactPoint = contactPoint; return this; } /** * A contact point for a person or organization. */ - public Builder contactPoint(ContactPoint.Builder contactPoint) { + @NotNull public Builder contactPoint(ContactPoint.Builder contactPoint) { return this.contactPoint(contactPoint.build()); } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization organization) { + @NotNull public Builder department(Organization organization) { this.department = organization; return this; } /** * A relationship between an organization and a department of that organization, also described as an organization (allowing different urls, logos, opening hours). For example: a store with a pharmacy, or a bakery with a cafe. */ - public Builder department(Organization.Builder organization) { + @NotNull public Builder department(Organization.Builder organization) { return this.department(organization.build()); } /** * The Dun & Bradstreet DUNS number for identifying an organization or business person. */ - public Builder duns(String duns) { + @NotNull public Builder duns(String duns) { this.duns = duns; return this; } /** * Email address. */ - public Builder email(String email) { + @NotNull public Builder email(String email) { this.email = email; return this; } /** * Someone working for this organization. */ - public Builder employee(Person person) { + @NotNull public Builder employee(Person person) { this.employee = person; return this; } /** * Someone working for this organization. */ - public Builder employee(Person.Builder person) { + @NotNull public Builder employee(Person.Builder person) { return this.employee(person.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * A person who founded this organization. */ - public Builder founder(Person person) { + @NotNull public Builder founder(Person person) { this.founder = person; return this; } /** * A person who founded this organization. */ - public Builder founder(Person.Builder person) { + @NotNull public Builder founder(Person.Builder person) { return this.founder(person.build()); } /** * The date that this organization was dissolved. */ - public Builder dissolutionDate(java.util.Date date) { + @NotNull public Builder dissolutionDate(java.util.Date date) { this.dissolutionDate = date; return this; } /** * The date that this organization was founded. */ - public Builder foundingDate(java.util.Date date) { + @NotNull public Builder foundingDate(java.util.Date date) { this.foundingDate = date; return this; } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place place) { + @NotNull public Builder hasPOS(Place place) { this.hasPOS = place; return this; } /** * Points-of-Sales operated by the organization or person. */ - public Builder hasPOS(Place.Builder place) { + @NotNull public Builder hasPOS(Place.Builder place) { return this.hasPOS(place.build()); } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * The official name of the organization, e.g. the registered company name. */ - public Builder legalName(String legalName) { + @NotNull public Builder legalName(String legalName) { this.legalName = legalName; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -238,13 +242,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -252,20 +256,20 @@ public Builder logo(String logo) { /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer offer) { + @NotNull public Builder makesOffer(Offer offer) { this.makesOffer = offer; return this; } /** * A pointer to products or services offered by the organization or person. */ - public Builder makesOffer(Offer.Builder offer) { + @NotNull public Builder makesOffer(Offer.Builder offer) { return this.makesOffer(offer.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization organization) { + @NotNull public Builder member(Organization organization) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder member(Organization organization) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Organization.Builder organization) { + @NotNull public Builder member(Organization.Builder organization) { return this.member(organization.build()); } /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person person) { + @NotNull public Builder member(Person person) { if (this.member == null) this.member = new OrganizationOrPerson(); this.member.setPerson(person); return this; @@ -287,13 +291,13 @@ public Builder member(Person person) { /** * A member of an Organization or a ProgramMembership. Organizations can be members of organizations; ProgramMembership is typically for individuals. */ - public Builder member(Person.Builder person) { + @NotNull public Builder member(Person.Builder person) { return this.member(person.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization organization) { + @NotNull public Builder memberOf(Organization organization) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setOrganization(organization); return this; @@ -301,13 +305,13 @@ public Builder memberOf(Organization organization) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(Organization.Builder organization) { + @NotNull public Builder memberOf(Organization.Builder organization) { return this.memberOf(organization.build()); } /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership programMembership) { + @NotNull public Builder memberOf(ProgramMembership programMembership) { if (this.memberOf == null) this.memberOf = new OrganizationOrProgramMembership(); this.memberOf.setProgramMembership(programMembership); return this; @@ -315,33 +319,33 @@ public Builder memberOf(ProgramMembership programMembership) { /** * An Organization (or ProgramMembership) to which this Person or Organization belongs. */ - public Builder memberOf(ProgramMembership.Builder programMembership) { + @NotNull public Builder memberOf(ProgramMembership.Builder programMembership) { return this.memberOf(programMembership.build()); } /** * The North American Industry Classification System (NAICS) code for a particular organization or business person. */ - public Builder naics(String naics) { + @NotNull public Builder naics(String naics) { this.naics = naics; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue quantitativeValue) { this.numberOfEmployees = quantitativeValue; return this; } /** * The number of employees in an organization e.g. business. */ - public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue) { return this.numberOfEmployees(quantitativeValue.build()); } /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo ownershipInfo) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setOwnershipInfo(ownershipInfo); return this; @@ -349,13 +353,13 @@ public Builder owns(OwnershipInfo ownershipInfo) { /** * Products owned by the organization or person. */ - public Builder owns(OwnershipInfo.Builder ownershipInfo) { + @NotNull public Builder owns(OwnershipInfo.Builder ownershipInfo) { return this.owns(ownershipInfo.build()); } /** * Products owned by the organization or person. */ - public Builder owns(Product product) { + @NotNull public Builder owns(Product product) { if (this.owns == null) this.owns = new OwnershipInfoOrProduct(); this.owns.setProduct(product); return this; @@ -363,100 +367,100 @@ public Builder owns(Product product) { /** * Products owned by the organization or person. */ - public Builder owns(Product.Builder product) { + @NotNull public Builder owns(Product.Builder product) { return this.owns(product.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand demand) { + @NotNull public Builder seeks(Demand demand) { this.seeks = demand; return this; } /** * A pointer to products or services sought by the organization or person (demand). */ - public Builder seeks(Demand.Builder demand) { + @NotNull public Builder seeks(Demand.Builder demand) { return this.seeks(demand.build()); } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization organization) { + @NotNull public Builder subOrganization(Organization organization) { this.subOrganization = organization; return this; } /** * A relationship between two organizations where the first includes the second, e.g., as a subsidiary. See also: the more specific 'department' property. */ - public Builder subOrganization(Organization.Builder organization) { + @NotNull public Builder subOrganization(Organization.Builder organization) { return this.subOrganization(organization.build()); } /** * The Tax / Fiscal ID of the organization or person, e.g. the TIN in the US or the CIF/NIF in Spain. */ - public Builder taxID(String taxID) { + @NotNull public Builder taxID(String taxID) { this.taxID = taxID; return this; } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } /** * The Value-added Tax ID of the organization or person. */ - public Builder vatID(String vatID) { + @NotNull public Builder vatID(String vatID) { this.vatID = vatID; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place place) { + @NotNull public Builder foundingLocation(Place place) { this.foundingLocation = place; return this; } /** * The place where the Organization was founded. */ - public Builder foundingLocation(Place.Builder place) { + @NotNull public Builder foundingLocation(Place.Builder place) { return this.foundingLocation(place.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -490,7 +494,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -525,7 +529,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -558,7 +562,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -566,38 +570,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -647,78 +651,78 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder contactPoint(ContactPoint contactPoint); - Builder contactPoint(ContactPoint.Builder contactPoint); - Builder department(Organization organization); - Builder department(Organization.Builder organization); - Builder duns(String duns); - Builder email(String email); - Builder employee(Person person); - Builder employee(Person.Builder person); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder founder(Person person); - Builder founder(Person.Builder person); - Builder dissolutionDate(java.util.Date date); - Builder foundingDate(java.util.Date date); - Builder globalLocationNumber(String globalLocationNumber); - Builder hasPOS(Place place); - Builder hasPOS(Place.Builder place); - Builder isicV4(String isicV4); - Builder legalName(String legalName); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder makesOffer(Offer offer); - Builder makesOffer(Offer.Builder offer); - Builder member(Organization organization); - Builder member(Organization.Builder organization); - Builder member(Person person); - Builder member(Person.Builder person); - Builder memberOf(Organization organization); - Builder memberOf(Organization.Builder organization); - Builder memberOf(ProgramMembership programMembership); - Builder memberOf(ProgramMembership.Builder programMembership); - Builder naics(String naics); - Builder numberOfEmployees(QuantitativeValue quantitativeValue); - Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); - Builder owns(OwnershipInfo ownershipInfo); - Builder owns(OwnershipInfo.Builder ownershipInfo); - Builder owns(Product product); - Builder owns(Product.Builder product); - Builder review(Review review); - Builder review(Review.Builder review); - Builder seeks(Demand demand); - Builder seeks(Demand.Builder demand); - Builder subOrganization(Organization organization); - Builder subOrganization(Organization.Builder organization); - Builder taxID(String taxID); - Builder telephone(String telephone); - Builder vatID(String vatID); - Builder foundingLocation(Place place); - Builder foundingLocation(Place.Builder place); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder contactPoint(ContactPoint contactPoint); + @NotNull Builder contactPoint(ContactPoint.Builder contactPoint); + @NotNull Builder department(Organization organization); + @NotNull Builder department(Organization.Builder organization); + @NotNull Builder duns(String duns); + @NotNull Builder email(String email); + @NotNull Builder employee(Person person); + @NotNull Builder employee(Person.Builder person); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder founder(Person person); + @NotNull Builder founder(Person.Builder person); + @NotNull Builder dissolutionDate(java.util.Date date); + @NotNull Builder foundingDate(java.util.Date date); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder hasPOS(Place place); + @NotNull Builder hasPOS(Place.Builder place); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder legalName(String legalName); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder makesOffer(Offer offer); + @NotNull Builder makesOffer(Offer.Builder offer); + @NotNull Builder member(Organization organization); + @NotNull Builder member(Organization.Builder organization); + @NotNull Builder member(Person person); + @NotNull Builder member(Person.Builder person); + @NotNull Builder memberOf(Organization organization); + @NotNull Builder memberOf(Organization.Builder organization); + @NotNull Builder memberOf(ProgramMembership programMembership); + @NotNull Builder memberOf(ProgramMembership.Builder programMembership); + @NotNull Builder naics(String naics); + @NotNull Builder numberOfEmployees(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfEmployees(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder owns(OwnershipInfo ownershipInfo); + @NotNull Builder owns(OwnershipInfo.Builder ownershipInfo); + @NotNull Builder owns(Product product); + @NotNull Builder owns(Product.Builder product); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder seeks(Demand demand); + @NotNull Builder seeks(Demand.Builder demand); + @NotNull Builder subOrganization(Organization organization); + @NotNull Builder subOrganization(Organization.Builder organization); + @NotNull Builder taxID(String taxID); + @NotNull Builder telephone(String telephone); + @NotNull Builder vatID(String vatID); + @NotNull Builder foundingLocation(Place place); + @NotNull Builder foundingLocation(Place.Builder place); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Therapeutic.java b/src/main/java/org/schema/Therapeutic.java index 8d73a233..80f4d492 100644 --- a/src/main/java/org/schema/Therapeutic.java +++ b/src/main/java/org/schema/Therapeutic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical device used for therapeutic purposes. */ @@ -25,7 +29,7 @@ public class Therapeutic { /** * Builder for {@link Therapeutic} */ - public static final class TherapeuticThingBuilder implements Builder { + static final class TherapeuticThingBuilder implements Builder { /** * Creates new {@link Therapeutic} instance. */ @@ -34,7 +38,7 @@ public Therapeutic build() { } } public interface Builder extends ThingBuilder { - + } protected Therapeutic() { diff --git a/src/main/java/org/schema/TherapeuticProcedure.java b/src/main/java/org/schema/TherapeuticProcedure.java index 67118392..7676e481 100644 --- a/src/main/java/org/schema/TherapeuticProcedure.java +++ b/src/main/java/org/schema/TherapeuticProcedure.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A medical procedure intended primarily for therapeutic purposes, aimed at improving a health condition. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class TherapeuticProcedure extends MedicalTherapy { /** * Builder for {@link TherapeuticProcedure} */ - public static final class TherapeuticProcedureThingBuilder implements Builder { + static final class TherapeuticProcedureThingBuilder implements Builder { /** * Creates new {@link TherapeuticProcedure} instance. */ @@ -36,164 +40,164 @@ public TherapeuticProcedure build() { /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity medicalEntity) { this.adverseOutcome = medicalEntity; return this; } /** * A possible complication and/or side effect of this therapy. If it is known that an adverse outcome is serious (resulting in death, disability, or permanent damage; requiring hospitalization; or is otherwise life-threatening or requires immediate medical attention), tag it as a seriouseAdverseOutcome instead. */ - public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder adverseOutcome(MedicalEntity.Builder medicalEntity) { return this.adverseOutcome(medicalEntity.build()); } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication medicalContraindication) { this.contraindication = medicalContraindication; return this; } /** * A contraindication for this therapy. */ - public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { + @NotNull public Builder contraindication(MedicalContraindication.Builder medicalContraindication) { return this.contraindication(medicalContraindication.build()); } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy medicalTherapy) { this.duplicateTherapy = medicalTherapy; return this; } /** * A therapy that duplicates or overlaps this one. */ - public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy) { return this.duplicateTherapy(medicalTherapy.build()); } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication medicalIndication) { + @NotNull public Builder indication(MedicalIndication medicalIndication) { this.indication = medicalIndication; return this; } /** * A factor that indicates use of this therapy for treatment and/or prevention of a condition, symptom, etc. For therapies such as drugs, indications can include both officially-approved indications as well as off-label uses. These can be distinguished by using the ApprovedIndication subtype of MedicalIndication. */ - public Builder indication(MedicalIndication.Builder medicalIndication) { + @NotNull public Builder indication(MedicalIndication.Builder medicalIndication) { return this.indication(medicalIndication.build()); } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity medicalEntity) { this.seriousAdverseOutcome = medicalEntity; return this; } /** * A possible serious complication and/or serious side effect of this therapy. Serious adverse outcomes include those that are life-threatening; result in death, disability, or permanent damage; require hospitalization or prolong existing hospitalization; cause congenital anomalies or birth defects; or jeopardize the patient and may require medical or surgical intervention to prevent one of the outcomes in this definition. */ - public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { + @NotNull public Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity) { return this.seriousAdverseOutcome(medicalEntity.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -227,7 +231,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -262,7 +266,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -295,7 +299,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -303,38 +307,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -363,40 +367,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder adverseOutcome(MedicalEntity medicalEntity); - Builder adverseOutcome(MedicalEntity.Builder medicalEntity); - Builder contraindication(MedicalContraindication medicalContraindication); - Builder contraindication(MedicalContraindication.Builder medicalContraindication); - Builder duplicateTherapy(MedicalTherapy medicalTherapy); - Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); - Builder indication(MedicalIndication medicalIndication); - Builder indication(MedicalIndication.Builder medicalIndication); - Builder seriousAdverseOutcome(MedicalEntity medicalEntity); - Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder adverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder adverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder contraindication(MedicalContraindication medicalContraindication); + @NotNull Builder contraindication(MedicalContraindication.Builder medicalContraindication); + @NotNull Builder duplicateTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder duplicateTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder indication(MedicalIndication medicalIndication); + @NotNull Builder indication(MedicalIndication.Builder medicalIndication); + @NotNull Builder seriousAdverseOutcome(MedicalEntity medicalEntity); + @NotNull Builder seriousAdverseOutcome(MedicalEntity.Builder medicalEntity); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Thing.java b/src/main/java/org/schema/Thing.java index e3d2f6d6..71e62413 100644 --- a/src/main/java/org/schema/Thing.java +++ b/src/main/java/org/schema/Thing.java @@ -18,17 +18,21 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The most generic type of item. */ -@com.fasterxml.jackson.databind.annotation.JsonSerialize(include = com.fasterxml.jackson.databind.annotation.JsonSerialize.Inclusion.NON_NULL) +@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL) public class Thing { - @com.fasterxml.jackson.annotation.JsonProperty("@type") + @JsonProperty("@type") public String getJsonLdType() { return getClass().getSimpleName(); } - @com.fasterxml.jackson.annotation.JsonProperty("@context") + @JsonProperty("@context") public String getJsonLdContext() { return "http://schema.org/"; } @@ -108,14 +112,14 @@ public String getUrl() { public Action getPotentialAction() { return myPotentialAction; } - @com.fasterxml.jackson.annotation.JsonProperty("@id") + @JsonProperty("@id") public String getId() { return myId; } /** * Builder for {@link Thing} */ - public static final class ThingThingBuilder implements Builder { + static final class ThingThingBuilder implements Builder { /** * Creates new {@link Thing} instance. */ @@ -125,21 +129,21 @@ public Thing build() { /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -173,7 +177,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -208,7 +212,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -241,7 +245,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -249,38 +253,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -298,18 +302,18 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Thing(String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Throat.java b/src/main/java/org/schema/Throat.java index d4383cb2..6c2f94a7 100644 --- a/src/main/java/org/schema/Throat.java +++ b/src/main/java/org/schema/Throat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Throat. */ @@ -25,7 +29,7 @@ public class Throat { /** * Builder for {@link Throat} */ - public static final class ThroatThingBuilder implements Builder { + static final class ThroatThingBuilder implements Builder { /** * Creates new {@link Throat} instance. */ @@ -34,7 +38,7 @@ public Throat build() { } } public interface Builder extends ThingBuilder { - + } protected Throat() { diff --git a/src/main/java/org/schema/Ticket.java b/src/main/java/org/schema/Ticket.java index e7c5b0c4..4de90f8b 100644 --- a/src/main/java/org/schema/Ticket.java +++ b/src/main/java/org/schema/Ticket.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Used to describe a ticket to an event, a flight, a bus ride, etc. */ @@ -49,7 +53,7 @@ public Organization getIssuedBy() { /** * The date the ticket was issued. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDateIssued() { return myDateIssued; } @@ -74,7 +78,7 @@ public String getTicketToken() { /** * Builder for {@link Ticket} */ - public static final class TicketThingBuilder implements Builder { + static final class TicketThingBuilder implements Builder { /** * Creates new {@link Ticket} instance. */ @@ -84,7 +88,7 @@ public Ticket build() { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -92,13 +96,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -106,13 +110,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -120,7 +124,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -128,13 +132,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -142,75 +146,75 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * The organization issuing the ticket or permit. */ - public Builder issuedBy(Organization organization) { + @NotNull public Builder issuedBy(Organization organization) { this.issuedBy = organization; return this; } /** * The organization issuing the ticket or permit. */ - public Builder issuedBy(Organization.Builder organization) { + @NotNull public Builder issuedBy(Organization.Builder organization) { return this.issuedBy(organization.build()); } /** * The date the ticket was issued. */ - public Builder dateIssued(java.util.Date date) { + @NotNull public Builder dateIssued(java.util.Date date) { this.dateIssued = date; return this; } /** * The seat associated with the ticket. */ - public Builder ticketedSeat(Seat seat) { + @NotNull public Builder ticketedSeat(Seat seat) { this.ticketedSeat = seat; return this; } /** * The seat associated with the ticket. */ - public Builder ticketedSeat(Seat.Builder seat) { + @NotNull public Builder ticketedSeat(Seat.Builder seat) { return this.ticketedSeat(seat.build()); } /** * The unique identifier for the ticket. */ - public Builder ticketNumber(String ticketNumber) { + @NotNull public Builder ticketNumber(String ticketNumber) { this.ticketNumber = ticketNumber; return this; } /** * Reference to an asset (e.g., Barcode, QR code image or PDF) usable for entrance. */ - public Builder ticketToken(String ticketToken) { + @NotNull public Builder ticketToken(String ticketToken) { this.ticketToken = ticketToken; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -244,7 +248,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -279,7 +283,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -312,7 +316,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -320,38 +324,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -377,34 +381,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder issuedBy(Organization organization); - Builder issuedBy(Organization.Builder organization); - Builder dateIssued(java.util.Date date); - Builder ticketedSeat(Seat seat); - Builder ticketedSeat(Seat.Builder seat); - Builder ticketNumber(String ticketNumber); - Builder ticketToken(String ticketToken); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder issuedBy(Organization organization); + @NotNull Builder issuedBy(Organization.Builder organization); + @NotNull Builder dateIssued(java.util.Date date); + @NotNull Builder ticketedSeat(Seat seat); + @NotNull Builder ticketedSeat(Seat.Builder seat); + @NotNull Builder ticketNumber(String ticketNumber); + @NotNull Builder ticketToken(String ticketToken); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/TieAction.java b/src/main/java/org/schema/TieAction.java index b064d321..95fdf297 100644 --- a/src/main/java/org/schema/TieAction.java +++ b/src/main/java/org/schema/TieAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of reaching a draw in a competitive activity. */ @@ -25,7 +29,7 @@ public class TieAction extends AchieveAction { /** * Builder for {@link TieAction} */ - public static final class TieActionThingBuilder implements Builder { + static final class TieActionThingBuilder implements Builder { /** * Creates new {@link TieAction} instance. */ @@ -35,7 +39,7 @@ public TieAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TipAction.java b/src/main/java/org/schema/TipAction.java index aab30992..cc36c8c8 100644 --- a/src/main/java/org/schema/TipAction.java +++ b/src/main/java/org/schema/TipAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of giving money voluntarily to a beneficiary in recognition of services rendered. */ @@ -31,7 +35,7 @@ public AudienceOrOrganizationOrPerson getRecipient() { /** * Builder for {@link TipAction} */ - public static final class TipActionThingBuilder implements Builder { + static final class TipActionThingBuilder implements Builder { /** * Creates new {@link TipAction} instance. */ @@ -41,7 +45,7 @@ public TipAction build() { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience audience) { + @NotNull public Builder recipient(Audience audience) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setAudience(audience); return this; @@ -49,13 +53,13 @@ public Builder recipient(Audience audience) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Audience.Builder audience) { + @NotNull public Builder recipient(Audience.Builder audience) { return this.recipient(audience.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization organization) { + @NotNull public Builder recipient(Organization organization) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setOrganization(organization); return this; @@ -63,13 +67,13 @@ public Builder recipient(Organization organization) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Organization.Builder organization) { + @NotNull public Builder recipient(Organization.Builder organization) { return this.recipient(organization.build()); } /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person person) { + @NotNull public Builder recipient(Person person) { if (this.recipient == null) this.recipient = new AudienceOrOrganizationOrPerson(); this.recipient.setPerson(person); return this; @@ -77,7 +81,7 @@ public Builder recipient(Person person) { /** * A sub property of participant. The participant who is at the receiving end of the action. */ - public Builder recipient(Person.Builder person) { + @NotNull public Builder recipient(Person.Builder person) { return this.recipient(person.build()); } /** @@ -103,7 +107,7 @@ public Builder recipient(Person.Builder person) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -131,7 +135,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -139,20 +143,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -160,13 +164,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -174,7 +178,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -182,7 +186,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -191,67 +195,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -285,7 +289,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -320,7 +324,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -353,7 +357,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -361,38 +365,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -419,40 +423,40 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder recipient(Audience audience); - Builder recipient(Audience.Builder audience); - Builder recipient(Organization organization); - Builder recipient(Organization.Builder organization); - Builder recipient(Person person); - Builder recipient(Person.Builder person); - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder recipient(Audience audience); + @NotNull Builder recipient(Audience.Builder audience); + @NotNull Builder recipient(Organization organization); + @NotNull Builder recipient(Organization.Builder organization); + @NotNull Builder recipient(Person person); + @NotNull Builder recipient(Person.Builder person); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/TireShop.java b/src/main/java/org/schema/TireShop.java index aac95425..c17f2b20 100644 --- a/src/main/java/org/schema/TireShop.java +++ b/src/main/java/org/schema/TireShop.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A tire shop. */ @@ -25,7 +29,7 @@ public class TireShop extends Store { /** * Builder for {@link TireShop} */ - public static final class TireShopThingBuilder implements Builder { + static final class TireShopThingBuilder implements Builder { /** * Creates new {@link TireShop} instance. */ @@ -35,107 +39,107 @@ public TireShop build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TollFree.java b/src/main/java/org/schema/TollFree.java index a9d72877..f42426a1 100644 --- a/src/main/java/org/schema/TollFree.java +++ b/src/main/java/org/schema/TollFree.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The associated telephone number is toll free. */ @@ -25,7 +29,7 @@ public class TollFree { /** * Builder for {@link TollFree} */ - public static final class TollFreeThingBuilder implements Builder { + static final class TollFreeThingBuilder implements Builder { /** * Creates new {@link TollFree} instance. */ @@ -34,7 +38,7 @@ public TollFree build() { } } public interface Builder extends ThingBuilder { - + } protected TollFree() { diff --git a/src/main/java/org/schema/TouristAttraction.java b/src/main/java/org/schema/TouristAttraction.java index 1773e6d0..d4a1fa20 100644 --- a/src/main/java/org/schema/TouristAttraction.java +++ b/src/main/java/org/schema/TouristAttraction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A tourist attraction. */ @@ -25,7 +29,7 @@ public class TouristAttraction extends Place { /** * Builder for {@link TouristAttraction} */ - public static final class TouristAttractionThingBuilder implements Builder { + static final class TouristAttractionThingBuilder implements Builder { /** * Creates new {@link TouristAttraction} instance. */ @@ -35,66 +39,66 @@ public TouristAttraction build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TouristInformationCenter.java b/src/main/java/org/schema/TouristInformationCenter.java index cdf40815..6a17ef47 100644 --- a/src/main/java/org/schema/TouristInformationCenter.java +++ b/src/main/java/org/schema/TouristInformationCenter.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A tourist information center. */ @@ -25,7 +29,7 @@ public class TouristInformationCenter extends LocalBusiness { /** * Builder for {@link TouristInformationCenter} */ - public static final class TouristInformationCenterThingBuilder implements Builder { + static final class TouristInformationCenterThingBuilder implements Builder { /** * Creates new {@link TouristInformationCenter} instance. */ @@ -35,107 +39,107 @@ public TouristInformationCenter build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Toxicologic.java b/src/main/java/org/schema/Toxicologic.java index 823964e8..314bb5aa 100644 --- a/src/main/java/org/schema/Toxicologic.java +++ b/src/main/java/org/schema/Toxicologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that is concerned with poisons, their nature, effects and detection and involved in the treatment of poisoning. */ @@ -25,7 +29,7 @@ public class Toxicologic { /** * Builder for {@link Toxicologic} */ - public static final class ToxicologicThingBuilder implements Builder { + static final class ToxicologicThingBuilder implements Builder { /** * Creates new {@link Toxicologic} instance. */ @@ -34,7 +38,7 @@ public Toxicologic build() { } } public interface Builder extends ThingBuilder { - + } protected Toxicologic() { diff --git a/src/main/java/org/schema/ToyStore.java b/src/main/java/org/schema/ToyStore.java index 12a83b76..1ba27987 100644 --- a/src/main/java/org/schema/ToyStore.java +++ b/src/main/java/org/schema/ToyStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A toy store. */ @@ -25,7 +29,7 @@ public class ToyStore extends Store { /** * Builder for {@link ToyStore} */ - public static final class ToyStoreThingBuilder implements Builder { + static final class ToyStoreThingBuilder implements Builder { /** * Creates new {@link ToyStore} instance. */ @@ -35,107 +39,107 @@ public ToyStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TrackAction.java b/src/main/java/org/schema/TrackAction.java index d6d9150a..5938f8b8 100644 --- a/src/main/java/org/schema/TrackAction.java +++ b/src/main/java/org/schema/TrackAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An agent tracks an object for updates.

Related actions:

  • FollowAction: Unlike FollowAction, TrackAction refers to the interest on the location of innanimates objects.
  • SubscribeAction: Unlike SubscribeAction, TrackAction refers to the interest on the location of innanimate objects
. */ @@ -31,7 +35,7 @@ public DeliveryMethod getDeliveryMethod() { /** * Builder for {@link TrackAction} */ - public static final class TrackActionThingBuilder implements Builder { + static final class TrackActionThingBuilder implements Builder { /** * Creates new {@link TrackAction} instance. */ @@ -41,20 +45,20 @@ public TrackAction build() { /** * A sub property of instrument. The method of delivery. */ - public Builder deliveryMethod(DeliveryMethod deliveryMethod) { + @NotNull public Builder deliveryMethod(DeliveryMethod deliveryMethod) { this.deliveryMethod = deliveryMethod; return this; } /** * A sub property of instrument. The method of delivery. */ - public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { + @NotNull public Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod) { return this.deliveryMethod(deliveryMethod.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -62,13 +66,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -76,7 +80,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -84,7 +88,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -93,67 +97,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -187,7 +191,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -222,7 +226,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -263,38 +267,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -319,32 +323,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder deliveryMethod(DeliveryMethod deliveryMethod); - Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder deliveryMethod(DeliveryMethod deliveryMethod); + @NotNull Builder deliveryMethod(DeliveryMethod.Builder deliveryMethod); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected TrackAction(DeliveryMethod deliveryMethod, 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) { diff --git a/src/main/java/org/schema/TradeAction.java b/src/main/java/org/schema/TradeAction.java index 7c0cce17..b33ada35 100644 --- a/src/main/java/org/schema/TradeAction.java +++ b/src/main/java/org/schema/TradeAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of participating in an exchange of goods and services for monetary compensation. An agent trades an object, product or service with a participant in exchange for a one time or periodic payment. */ @@ -57,7 +61,7 @@ public PriceSpecification getPriceSpecification() { /** * Builder for {@link TradeAction} */ - public static final class TradeActionThingBuilder implements Builder { + static final class TradeActionThingBuilder implements Builder { /** * Creates new {@link TradeAction} instance. */ @@ -87,7 +91,7 @@ public TradeAction build() { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -115,7 +119,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -123,20 +127,20 @@ public Builder price(String price) { /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification priceSpecification) { this.priceSpecification = priceSpecification; return this; } /** * One or more detailed price specifications, indicating the unit price and delivery or payment charges. */ - public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder priceSpecification(PriceSpecification.Builder priceSpecification) { return this.priceSpecification(priceSpecification.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -144,13 +148,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -158,7 +162,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -166,7 +170,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -175,67 +179,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -269,7 +273,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -304,7 +308,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -337,7 +341,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -345,38 +349,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -402,34 +406,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder price(Number number); - Builder price(String price); - Builder priceSpecification(PriceSpecification priceSpecification); - Builder priceSpecification(PriceSpecification.Builder priceSpecification); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder priceSpecification(PriceSpecification priceSpecification); + @NotNull Builder priceSpecification(PriceSpecification.Builder priceSpecification); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/TraditionalChinese.java b/src/main/java/org/schema/TraditionalChinese.java index 25e6f2a8..b8b8fa0e 100644 --- a/src/main/java/org/schema/TraditionalChinese.java +++ b/src/main/java/org/schema/TraditionalChinese.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A system of medicine based on common theoretical concepts that originated in China and evolved over thousands of years, that uses herbs, acupuncture, exercise, massage, dietary therapy, and other methods to treat a wide range of conditions. */ @@ -25,7 +29,7 @@ public class TraditionalChinese { /** * Builder for {@link TraditionalChinese} */ - public static final class TraditionalChineseThingBuilder implements Builder { + static final class TraditionalChineseThingBuilder implements Builder { /** * Creates new {@link TraditionalChinese} instance. */ @@ -34,7 +38,7 @@ public TraditionalChinese build() { } } public interface Builder extends ThingBuilder { - + } protected TraditionalChinese() { diff --git a/src/main/java/org/schema/TrainReservation.java b/src/main/java/org/schema/TrainReservation.java index 6b3376d9..86761755 100644 --- a/src/main/java/org/schema/TrainReservation.java +++ b/src/main/java/org/schema/TrainReservation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A reservation for train travel.Note: This type is for information about actual reservations, e.g. in confirmation emails or HTML pages with individual confirmations of reservations. For offers of tickets, use http://schema.org/Offer. */ @@ -25,7 +29,7 @@ public class TrainReservation extends Reservation { /** * Builder for {@link TrainReservation} */ - public static final class TrainReservationThingBuilder implements Builder { + static final class TrainReservationThingBuilder implements Builder { /** * Creates new {@link TrainReservation} instance. */ @@ -35,40 +39,40 @@ public TrainReservation build() { /** * A unique identifier for the reservation. */ - public Builder reservationId(String reservationId) { + @NotNull public Builder reservationId(String reservationId) { this.reservationId = reservationId; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType reservationStatusType) { this.reservationStatus = reservationStatusType; return this; } /** * The current status of the reservation. */ - public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { + @NotNull public Builder reservationStatus(ReservationStatusType.Builder reservationStatusType) { return this.reservationStatus(reservationStatusType.build()); } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing thing) { + @NotNull public Builder reservationFor(Thing thing) { this.reservationFor = thing; return this; } /** * The thing -- flight, event, restaurant,etc. being reserved. */ - public Builder reservationFor(Thing.Builder thing) { + @NotNull public Builder reservationFor(Thing.Builder thing) { return this.reservationFor(thing.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization organization) { + @NotNull public Builder underName(Organization organization) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setOrganization(organization); return this; @@ -76,13 +80,13 @@ public Builder underName(Organization organization) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Organization.Builder organization) { + @NotNull public Builder underName(Organization.Builder organization) { return this.underName(organization.build()); } /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person person) { + @NotNull public Builder underName(Person person) { if (this.underName == null) this.underName = new OrganizationOrPerson(); this.underName.setPerson(person); return this; @@ -90,13 +94,13 @@ public Builder underName(Person person) { /** * The person or organization the reservation or ticket is for. */ - public Builder underName(Person.Builder person) { + @NotNull public Builder underName(Person.Builder person) { return this.underName(person.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -104,13 +108,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -118,53 +122,53 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The date and time the reservation was booked. */ - public Builder bookingTime(java.util.Date date) { + @NotNull public Builder bookingTime(java.util.Date date) { this.bookingTime = date; return this; } /** * The date and time the reservation was modified. */ - public Builder modifiedTime(java.util.Date date) { + @NotNull public Builder modifiedTime(java.util.Date date) { this.modifiedTime = date; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership programMembership) { this.programMembershipUsed = programMembership; return this; } /** * Any membership in a frequent flyer, hotel loyalty program, etc. being applied to the reservation. */ - public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { + @NotNull public Builder programMembershipUsed(ProgramMembership.Builder programMembership) { return this.programMembershipUsed(programMembership.build()); } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket ticket) { + @NotNull public Builder reservedTicket(Ticket ticket) { this.reservedTicket = ticket; return this; } /** * A ticket associated with the reservation. */ - public Builder reservedTicket(Ticket.Builder ticket) { + @NotNull public Builder reservedTicket(Ticket.Builder ticket) { return this.reservedTicket(ticket.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(Number number) { + @NotNull public Builder totalPrice(Number number) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setNumber(number); return this; @@ -172,7 +176,7 @@ public Builder totalPrice(Number number) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification priceSpecification) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setPriceSpecification(priceSpecification); return this; @@ -180,13 +184,13 @@ public Builder totalPrice(PriceSpecification priceSpecification) { /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder totalPrice(PriceSpecification.Builder priceSpecification) { return this.totalPrice(priceSpecification.build()); } /** * The total price for the reservation or ticket, including applicable taxes, shipping, etc. */ - public Builder totalPrice(String totalPrice) { + @NotNull public Builder totalPrice(String totalPrice) { if (this.totalPrice == null) this.totalPrice = new NumberOrPriceSpecificationOrString(); this.totalPrice.setString(totalPrice); return this; @@ -194,14 +198,14 @@ public Builder totalPrice(String totalPrice) { /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization organization) { + @NotNull public Builder broker(Organization organization) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setOrganization(organization); return this; @@ -209,13 +213,13 @@ public Builder broker(Organization organization) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Organization.Builder organization) { + @NotNull public Builder broker(Organization.Builder organization) { return this.broker(organization.build()); } /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person person) { + @NotNull public Builder broker(Person person) { if (this.broker == null) this.broker = new OrganizationOrPerson(); this.broker.setPerson(person); return this; @@ -223,27 +227,27 @@ public Builder broker(Person person) { /** * An entity that arranges for an exchange between a buyer and a seller. In most cases a broker never acquires or releases ownership of a product or service involved in an exchange. If it is not clear whether an entity is a broker, seller, or buyer, the latter two terms are preferred. */ - public Builder broker(Person.Builder person) { + @NotNull public Builder broker(Person.Builder person) { return this.broker(person.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -277,7 +281,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -312,7 +316,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -345,7 +349,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -353,38 +357,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -414,46 +418,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder reservationId(String reservationId); - Builder reservationStatus(ReservationStatusType reservationStatusType); - Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); - Builder reservationFor(Thing thing); - Builder reservationFor(Thing.Builder thing); - Builder underName(Organization organization); - Builder underName(Organization.Builder organization); - Builder underName(Person person); - Builder underName(Person.Builder person); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder bookingTime(java.util.Date date); - Builder modifiedTime(java.util.Date date); - Builder programMembershipUsed(ProgramMembership programMembership); - Builder programMembershipUsed(ProgramMembership.Builder programMembership); - Builder reservedTicket(Ticket ticket); - Builder reservedTicket(Ticket.Builder ticket); - Builder totalPrice(Number number); - Builder totalPrice(PriceSpecification priceSpecification); - Builder totalPrice(PriceSpecification.Builder priceSpecification); - Builder totalPrice(String totalPrice); - Builder priceCurrency(String priceCurrency); - Builder broker(Organization organization); - Builder broker(Organization.Builder organization); - Builder broker(Person person); - Builder broker(Person.Builder person); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder reservationId(String reservationId); + @NotNull Builder reservationStatus(ReservationStatusType reservationStatusType); + @NotNull Builder reservationStatus(ReservationStatusType.Builder reservationStatusType); + @NotNull Builder reservationFor(Thing thing); + @NotNull Builder reservationFor(Thing.Builder thing); + @NotNull Builder underName(Organization organization); + @NotNull Builder underName(Organization.Builder organization); + @NotNull Builder underName(Person person); + @NotNull Builder underName(Person.Builder person); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder bookingTime(java.util.Date date); + @NotNull Builder modifiedTime(java.util.Date date); + @NotNull Builder programMembershipUsed(ProgramMembership programMembership); + @NotNull Builder programMembershipUsed(ProgramMembership.Builder programMembership); + @NotNull Builder reservedTicket(Ticket ticket); + @NotNull Builder reservedTicket(Ticket.Builder ticket); + @NotNull Builder totalPrice(Number number); + @NotNull Builder totalPrice(PriceSpecification priceSpecification); + @NotNull Builder totalPrice(PriceSpecification.Builder priceSpecification); + @NotNull Builder totalPrice(String totalPrice); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder broker(Organization organization); + @NotNull Builder broker(Organization.Builder organization); + @NotNull Builder broker(Person person); + @NotNull Builder broker(Person.Builder person); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/TrainStation.java b/src/main/java/org/schema/TrainStation.java index 1f804412..8bfcf651 100644 --- a/src/main/java/org/schema/TrainStation.java +++ b/src/main/java/org/schema/TrainStation.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A train station. */ @@ -25,7 +29,7 @@ public class TrainStation extends CivicStructure { /** * Builder for {@link TrainStation} */ - public static final class TrainStationThingBuilder implements Builder { + static final class TrainStationThingBuilder implements Builder { /** * Creates new {@link TrainStation} instance. */ @@ -35,73 +39,73 @@ public TrainStation build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TrainTrip.java b/src/main/java/org/schema/TrainTrip.java index c0e1b2de..148261f1 100644 --- a/src/main/java/org/schema/TrainTrip.java +++ b/src/main/java/org/schema/TrainTrip.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A trip on a commercial train line. */ @@ -31,14 +35,14 @@ public OrganizationOrPerson getProvider() { /** * The expected departure time. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDepartureTime() { return myDepartureTime; } /** * The expected arrival time. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getArrivalTime() { return myArrivalTime; } @@ -81,7 +85,7 @@ public String getArrivalPlatform() { /** * Builder for {@link TrainTrip} */ - public static final class TrainTripThingBuilder implements Builder { + static final class TrainTripThingBuilder implements Builder { /** * Creates new {@link TrainTrip} instance. */ @@ -91,7 +95,7 @@ public TrainTrip build() { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -99,13 +103,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -113,95 +117,95 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The expected departure time. */ - public Builder departureTime(java.util.Date date) { + @NotNull public Builder departureTime(java.util.Date date) { this.departureTime = date; return this; } /** * The expected arrival time. */ - public Builder arrivalTime(java.util.Date date) { + @NotNull public Builder arrivalTime(java.util.Date date) { this.arrivalTime = date; return this; } /** * The unique identifier for the train. */ - public Builder trainNumber(String trainNumber) { + @NotNull public Builder trainNumber(String trainNumber) { this.trainNumber = trainNumber; return this; } /** * The name of the train (e.g. The Orient Express). */ - public Builder trainName(String trainName) { + @NotNull public Builder trainName(String trainName) { this.trainName = trainName; return this; } /** * The station from which the train departs. */ - public Builder departureStation(TrainStation trainStation) { + @NotNull public Builder departureStation(TrainStation trainStation) { this.departureStation = trainStation; return this; } /** * The station from which the train departs. */ - public Builder departureStation(TrainStation.Builder trainStation) { + @NotNull public Builder departureStation(TrainStation.Builder trainStation) { return this.departureStation(trainStation.build()); } /** * The station where the train trip ends. */ - public Builder arrivalStation(TrainStation trainStation) { + @NotNull public Builder arrivalStation(TrainStation trainStation) { this.arrivalStation = trainStation; return this; } /** * The station where the train trip ends. */ - public Builder arrivalStation(TrainStation.Builder trainStation) { + @NotNull public Builder arrivalStation(TrainStation.Builder trainStation) { return this.arrivalStation(trainStation.build()); } /** * The platform from which the train departs. */ - public Builder departurePlatform(String departurePlatform) { + @NotNull public Builder departurePlatform(String departurePlatform) { this.departurePlatform = departurePlatform; return this; } /** * The platform where the train arrives. */ - public Builder arrivalPlatform(String arrivalPlatform) { + @NotNull public Builder arrivalPlatform(String arrivalPlatform) { this.arrivalPlatform = arrivalPlatform; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -235,7 +239,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -270,7 +274,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -303,7 +307,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -311,38 +315,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -369,32 +373,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder departureTime(java.util.Date date); - Builder arrivalTime(java.util.Date date); - Builder trainNumber(String trainNumber); - Builder trainName(String trainName); - Builder departureStation(TrainStation trainStation); - Builder departureStation(TrainStation.Builder trainStation); - Builder arrivalStation(TrainStation trainStation); - Builder arrivalStation(TrainStation.Builder trainStation); - Builder departurePlatform(String departurePlatform); - Builder arrivalPlatform(String arrivalPlatform); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder departureTime(java.util.Date date); + @NotNull Builder arrivalTime(java.util.Date date); + @NotNull Builder trainNumber(String trainNumber); + @NotNull Builder trainName(String trainName); + @NotNull Builder departureStation(TrainStation trainStation); + @NotNull Builder departureStation(TrainStation.Builder trainStation); + @NotNull Builder arrivalStation(TrainStation trainStation); + @NotNull Builder arrivalStation(TrainStation.Builder trainStation); + @NotNull Builder departurePlatform(String departurePlatform); + @NotNull Builder arrivalPlatform(String arrivalPlatform); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected TrainTrip(OrganizationOrPerson provider, java.util.Date departureTime, java.util.Date arrivalTime, String trainNumber, String trainName, TrainStation departureStation, TrainStation arrivalStation, String departurePlatform, String arrivalPlatform, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/TransferAction.java b/src/main/java/org/schema/TransferAction.java index a7a0803f..75915a6e 100644 --- a/src/main/java/org/schema/TransferAction.java +++ b/src/main/java/org/schema/TransferAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of transferring/moving (abstract or concrete) animate or inanimate objects from one place to another. */ @@ -37,7 +41,7 @@ public Place getToLocation() { /** * Builder for {@link TransferAction} */ - public static final class TransferActionThingBuilder implements Builder { + static final class TransferActionThingBuilder implements Builder { /** * Creates new {@link TransferAction} instance. */ @@ -47,33 +51,33 @@ public TransferAction build() { /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -81,13 +85,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -95,7 +99,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -103,7 +107,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -112,67 +116,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -206,7 +210,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -241,7 +245,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -274,7 +278,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -282,38 +286,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -339,34 +343,34 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected TransferAction(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) { diff --git a/src/main/java/org/schema/TransitMap.java b/src/main/java/org/schema/TransitMap.java index 9121a6b3..af331cbe 100644 --- a/src/main/java/org/schema/TransitMap.java +++ b/src/main/java/org/schema/TransitMap.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A transit map. */ @@ -25,7 +29,7 @@ public class TransitMap { /** * Builder for {@link TransitMap} */ - public static final class TransitMapThingBuilder implements Builder { + static final class TransitMapThingBuilder implements Builder { /** * Creates new {@link TransitMap} instance. */ @@ -34,7 +38,7 @@ public TransitMap build() { } } public interface Builder extends ThingBuilder { - + } protected TransitMap() { diff --git a/src/main/java/org/schema/TravelAction.java b/src/main/java/org/schema/TravelAction.java index 0eb2806e..dd91d4b2 100644 --- a/src/main/java/org/schema/TravelAction.java +++ b/src/main/java/org/schema/TravelAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of traveling from an fromLocation to a destination by a specified mode of transport, optionally with participants. */ @@ -31,7 +35,7 @@ public Distance getDistance() { /** * Builder for {@link TravelAction} */ - public static final class TravelActionThingBuilder implements Builder { + static final class TravelActionThingBuilder implements Builder { /** * Creates new {@link TravelAction} instance. */ @@ -41,46 +45,46 @@ public TravelAction build() { /** * The distance travelled, e.g. exercising or travelling. */ - public Builder distance(Distance distance) { + @NotNull public Builder distance(Distance distance) { this.distance = distance; return this; } /** * The distance travelled, e.g. exercising or travelling. */ - public Builder distance(Distance.Builder distance) { + @NotNull public Builder distance(Distance.Builder distance) { return this.distance(distance.build()); } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place place) { + @NotNull public Builder fromLocation(Place place) { this.fromLocation = place; return this; } /** * A sub property of location. The original location of the object or the agent before the action. */ - public Builder fromLocation(Place.Builder place) { + @NotNull public Builder fromLocation(Place.Builder place) { return this.fromLocation(place.build()); } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place place) { + @NotNull public Builder toLocation(Place place) { this.toLocation = place; return this; } /** * A sub property of location. The final location of the object or the agent after the action. */ - public Builder toLocation(Place.Builder place) { + @NotNull public Builder toLocation(Place.Builder place) { return this.toLocation(place.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -88,13 +92,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -102,7 +106,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -110,7 +114,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -119,67 +123,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -213,7 +217,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -248,7 +252,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -281,7 +285,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -289,38 +293,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -347,36 +351,36 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder distance(Distance distance); - Builder distance(Distance.Builder distance); - Builder fromLocation(Place place); - Builder fromLocation(Place.Builder place); - Builder toLocation(Place place); - Builder toLocation(Place.Builder place); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder distance(Distance distance); + @NotNull Builder distance(Distance.Builder distance); + @NotNull Builder fromLocation(Place place); + @NotNull Builder fromLocation(Place.Builder place); + @NotNull Builder toLocation(Place place); + @NotNull Builder toLocation(Place.Builder place); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected TravelAction(Distance distance, 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) { diff --git a/src/main/java/org/schema/TravelAgency.java b/src/main/java/org/schema/TravelAgency.java index fda648a2..bd6eb070 100644 --- a/src/main/java/org/schema/TravelAgency.java +++ b/src/main/java/org/schema/TravelAgency.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A travel agency. */ @@ -25,7 +29,7 @@ public class TravelAgency extends LocalBusiness { /** * Builder for {@link TravelAgency} */ - public static final class TravelAgencyThingBuilder implements Builder { + static final class TravelAgencyThingBuilder implements Builder { /** * Creates new {@link TravelAgency} instance. */ @@ -35,107 +39,107 @@ public TravelAgency build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TreatmentIndication.java b/src/main/java/org/schema/TreatmentIndication.java index 4eaafc52..2f2f20ce 100644 --- a/src/main/java/org/schema/TreatmentIndication.java +++ b/src/main/java/org/schema/TreatmentIndication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An indication for treating an underlying condition, symptom, etc. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class TreatmentIndication extends MedicalIndication { /** * Builder for {@link TreatmentIndication} */ - public static final class TreatmentIndicationThingBuilder implements Builder { + static final class TreatmentIndicationThingBuilder implements Builder { /** * Creates new {@link TreatmentIndication} instance. */ @@ -36,99 +40,99 @@ public TreatmentIndication build() { /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -162,7 +166,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -197,7 +201,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -230,7 +234,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -238,38 +242,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -293,30 +297,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/TripleBlindedTrial.java b/src/main/java/org/schema/TripleBlindedTrial.java index d944dc8a..16024c59 100644 --- a/src/main/java/org/schema/TripleBlindedTrial.java +++ b/src/main/java/org/schema/TripleBlindedTrial.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A trial design in which neither the researcher, the person administering the therapy nor the patient knows the details of the treatment the patient was randomly assigned to. */ @@ -25,7 +29,7 @@ public class TripleBlindedTrial { /** * Builder for {@link TripleBlindedTrial} */ - public static final class TripleBlindedTrialThingBuilder implements Builder { + static final class TripleBlindedTrialThingBuilder implements Builder { /** * Creates new {@link TripleBlindedTrial} instance. */ @@ -34,7 +38,7 @@ public TripleBlindedTrial build() { } } public interface Builder extends ThingBuilder { - + } protected TripleBlindedTrial() { diff --git a/src/main/java/org/schema/TypeAndQuantityNode.java b/src/main/java/org/schema/TypeAndQuantityNode.java index fe4c0452..c348d35b 100644 --- a/src/main/java/org/schema/TypeAndQuantityNode.java +++ b/src/main/java/org/schema/TypeAndQuantityNode.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A structured value indicating the quantity, unit of measurement, and business function of goods included in a bundle offer. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -57,7 +61,7 @@ public String getUnitText() { /** * Builder for {@link TypeAndQuantityNode} */ - public static final class TypeAndQuantityNodeThingBuilder implements Builder { + static final class TypeAndQuantityNodeThingBuilder implements Builder { /** * Creates new {@link TypeAndQuantityNode} instance. */ @@ -67,15 +71,15 @@ public TypeAndQuantityNode build() { /** * The quantity of the goods included in the offer. */ - public Builder amountOfThisGood(Integer integer) { + @NotNull public Builder amountOfThisGood(int amountOfThisGood) { if (this.amountOfThisGood == null) this.amountOfThisGood = new Number(); - this.amountOfThisGood.setInteger(integer); + this.amountOfThisGood.setInt(amountOfThisGood); return this; } /** * The quantity of the goods included in the offer. */ - public Builder amountOfThisGood(Long amountOfThisGood) { + @NotNull public Builder amountOfThisGood(long amountOfThisGood) { if (this.amountOfThisGood == null) this.amountOfThisGood = new Number(); this.amountOfThisGood.setLong(amountOfThisGood); return this; @@ -83,7 +87,7 @@ public Builder amountOfThisGood(Long amountOfThisGood) { /** * The quantity of the goods included in the offer. */ - public Builder amountOfThisGood(Float amountOfThisGood) { + @NotNull public Builder amountOfThisGood(float amountOfThisGood) { if (this.amountOfThisGood == null) this.amountOfThisGood = new Number(); this.amountOfThisGood.setFloat(amountOfThisGood); return this; @@ -91,7 +95,7 @@ public Builder amountOfThisGood(Float amountOfThisGood) { /** * The quantity of the goods included in the offer. */ - public Builder amountOfThisGood(Double amountOfThisGood) { + @NotNull public Builder amountOfThisGood(double amountOfThisGood) { if (this.amountOfThisGood == null) this.amountOfThisGood = new Number(); this.amountOfThisGood.setDouble(amountOfThisGood); return this; @@ -99,7 +103,7 @@ public Builder amountOfThisGood(Double amountOfThisGood) { /** * The quantity of the goods included in the offer. */ - public Builder amountOfThisGood(String amountOfThisGood) { + @NotNull public Builder amountOfThisGood(String amountOfThisGood) { if (this.amountOfThisGood == null) this.amountOfThisGood = new Number(); this.amountOfThisGood.setString(amountOfThisGood); return this; @@ -107,33 +111,33 @@ public Builder amountOfThisGood(String amountOfThisGood) { /** * The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell. */ - public Builder businessFunction(BusinessFunction businessFunction) { + @NotNull public Builder businessFunction(BusinessFunction businessFunction) { this.businessFunction = businessFunction; return this; } /** * The business function (e.g. sell, lease, repair, dispose) of the offer or component of a bundle (TypeAndQuantityNode). The default is http://purl.org/goodrelations/v1#Sell. */ - public Builder businessFunction(BusinessFunction.Builder businessFunction) { + @NotNull public Builder businessFunction(BusinessFunction.Builder businessFunction) { return this.businessFunction(businessFunction.build()); } /** * The product that this structured value is referring to. */ - public Builder typeOfGood(Product product) { + @NotNull public Builder typeOfGood(Product product) { this.typeOfGood = product; return this; } /** * The product that this structured value is referring to. */ - public Builder typeOfGood(Product.Builder product) { + @NotNull public Builder typeOfGood(Product.Builder product) { return this.typeOfGood(product.build()); } /** * The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon. */ - public Builder unitCode(String unitCode) { + @NotNull public Builder unitCode(String unitCode) { this.unitCode = unitCode; return this; } @@ -141,28 +145,28 @@ public Builder unitCode(String unitCode) { * A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode. */ - public Builder unitText(String unitText) { + @NotNull public Builder unitText(String unitText) { this.unitText = unitText; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -196,7 +200,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -231,7 +235,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -264,7 +268,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -272,38 +276,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -326,29 +330,29 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder amountOfThisGood(Integer integer); - Builder amountOfThisGood(Long amountOfThisGood); - Builder amountOfThisGood(Float amountOfThisGood); - Builder amountOfThisGood(Double amountOfThisGood); - Builder amountOfThisGood(String amountOfThisGood); - Builder businessFunction(BusinessFunction businessFunction); - Builder businessFunction(BusinessFunction.Builder businessFunction); - Builder typeOfGood(Product product); - Builder typeOfGood(Product.Builder product); - Builder unitCode(String unitCode); - Builder unitText(String unitText); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder amountOfThisGood(int amountOfThisGood); + @NotNull Builder amountOfThisGood(long amountOfThisGood); + @NotNull Builder amountOfThisGood(float amountOfThisGood); + @NotNull Builder amountOfThisGood(double amountOfThisGood); + @NotNull Builder amountOfThisGood(String amountOfThisGood); + @NotNull Builder businessFunction(BusinessFunction businessFunction); + @NotNull Builder businessFunction(BusinessFunction.Builder businessFunction); + @NotNull Builder typeOfGood(Product product); + @NotNull Builder typeOfGood(Product.Builder product); + @NotNull Builder unitCode(String unitCode); + @NotNull Builder unitText(String unitText); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected TypeAndQuantityNode(Number amountOfThisGood, BusinessFunction businessFunction, Product typeOfGood, String unitCode, String unitText, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/Ultrasound.java b/src/main/java/org/schema/Ultrasound.java index 99237659..43aedaa2 100644 --- a/src/main/java/org/schema/Ultrasound.java +++ b/src/main/java/org/schema/Ultrasound.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Ultrasound imaging. */ @@ -25,7 +29,7 @@ public class Ultrasound { /** * Builder for {@link Ultrasound} */ - public static final class UltrasoundThingBuilder implements Builder { + static final class UltrasoundThingBuilder implements Builder { /** * Creates new {@link Ultrasound} instance. */ @@ -34,7 +38,7 @@ public Ultrasound build() { } } public interface Builder extends ThingBuilder { - + } protected Ultrasound() { diff --git a/src/main/java/org/schema/UnRegisterAction.java b/src/main/java/org/schema/UnRegisterAction.java index 2d3a5c17..c2b74080 100644 --- a/src/main/java/org/schema/UnRegisterAction.java +++ b/src/main/java/org/schema/UnRegisterAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of un-registering from a service.

Related actions:

  • RegisterAction: antonym of UnRegisterAction.
  • Leave: Unlike LeaveAction, UnRegisterAction implies that you are unregistering from a service you werer previously registered, rather than leaving a team/group of people
. */ @@ -25,7 +29,7 @@ public class UnRegisterAction extends InteractAction { /** * Builder for {@link UnRegisterAction} */ - public static final class UnRegisterActionThingBuilder implements Builder { + static final class UnRegisterActionThingBuilder implements Builder { /** * Creates new {@link UnRegisterAction} instance. */ @@ -35,7 +39,7 @@ public UnRegisterAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UnitPriceSpecification.java b/src/main/java/org/schema/UnitPriceSpecification.java index 514be410..3eaa516c 100644 --- a/src/main/java/org/schema/UnitPriceSpecification.java +++ b/src/main/java/org/schema/UnitPriceSpecification.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The price asked for a given offer by the respective organization or person. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -51,7 +55,7 @@ public String getUnitText() { /** * Builder for {@link UnitPriceSpecification} */ - public static final class UnitPriceSpecificationThingBuilder implements Builder { + static final class UnitPriceSpecificationThingBuilder implements Builder { /** * Creates new {@link UnitPriceSpecification} instance. */ @@ -61,15 +65,15 @@ public UnitPriceSpecification build() { /** * This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property. */ - public Builder billingIncrement(Integer integer) { + @NotNull public Builder billingIncrement(int billingIncrement) { if (this.billingIncrement == null) this.billingIncrement = new Number(); - this.billingIncrement.setInteger(integer); + this.billingIncrement.setInt(billingIncrement); return this; } /** * This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property. */ - public Builder billingIncrement(Long billingIncrement) { + @NotNull public Builder billingIncrement(long billingIncrement) { if (this.billingIncrement == null) this.billingIncrement = new Number(); this.billingIncrement.setLong(billingIncrement); return this; @@ -77,7 +81,7 @@ public Builder billingIncrement(Long billingIncrement) { /** * This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property. */ - public Builder billingIncrement(Float billingIncrement) { + @NotNull public Builder billingIncrement(float billingIncrement) { if (this.billingIncrement == null) this.billingIncrement = new Number(); this.billingIncrement.setFloat(billingIncrement); return this; @@ -85,7 +89,7 @@ public Builder billingIncrement(Float billingIncrement) { /** * This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property. */ - public Builder billingIncrement(Double billingIncrement) { + @NotNull public Builder billingIncrement(double billingIncrement) { if (this.billingIncrement == null) this.billingIncrement = new Number(); this.billingIncrement.setDouble(billingIncrement); return this; @@ -93,7 +97,7 @@ public Builder billingIncrement(Double billingIncrement) { /** * This property specifies the minimal quantity and rounding increment that will be the basis for the billing. The unit of measurement is specified by the unitCode property. */ - public Builder billingIncrement(String billingIncrement) { + @NotNull public Builder billingIncrement(String billingIncrement) { if (this.billingIncrement == null) this.billingIncrement = new Number(); this.billingIncrement.setString(billingIncrement); return this; @@ -101,14 +105,14 @@ public Builder billingIncrement(String billingIncrement) { /** * A short text or acronym indicating multiple price specifications for the same offer, e.g. SRP for the suggested retail price or INVOICE for the invoice price, mostly used in the car industry. */ - public Builder priceType(String priceType) { + @NotNull public Builder priceType(String priceType) { this.priceType = priceType; return this; } /** * The unit of measurement given using the UN/CEFACT Common Code (3 characters) or a URL. Other codes than the UN/CEFACT Common Code may be used with a prefix followed by a colon. */ - public Builder unitCode(String unitCode) { + @NotNull public Builder unitCode(String unitCode) { this.unitCode = unitCode; return this; } @@ -116,48 +120,48 @@ public Builder unitCode(String unitCode) { * A string or text indicating the unit of measurement. Useful if you cannot provide a standard unit code for unitCode. */ - public Builder unitText(String unitText) { + @NotNull public Builder unitText(String unitText) { this.unitText = unitText; return this; } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue quantitativeValue) { this.eligibleQuantity = quantitativeValue; return this; } /** * The interval and unit of measurement of ordering quantities for which the offer or price specification is valid. This allows e.g. specifying that a certain freight charge is valid only for a certain quantity. */ - public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue) { return this.eligibleQuantity(quantitativeValue.build()); } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification priceSpecification) { this.eligibleTransactionVolume = priceSpecification; return this; } /** * The transaction volume, in a monetary unit, for which the offer or price specification is valid, e.g. for indicating a minimal purchasing volume, to express free shipping above a certain order volume, or to limit the acceptance of credit cards to purchases to a certain minimal amount. */ - public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { + @NotNull public Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification) { return this.eligibleTransactionVolume(priceSpecification.build()); } /** * The highest price if the price is a range. */ - public Builder maxPrice(Integer integer) { + @NotNull public Builder maxPrice(int maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); - this.maxPrice.setInteger(integer); + this.maxPrice.setInt(maxPrice); return this; } /** * The highest price if the price is a range. */ - public Builder maxPrice(Long maxPrice) { + @NotNull public Builder maxPrice(long maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setLong(maxPrice); return this; @@ -165,7 +169,7 @@ public Builder maxPrice(Long maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(Float maxPrice) { + @NotNull public Builder maxPrice(float maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setFloat(maxPrice); return this; @@ -173,7 +177,7 @@ public Builder maxPrice(Float maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(Double maxPrice) { + @NotNull public Builder maxPrice(double maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setDouble(maxPrice); return this; @@ -181,7 +185,7 @@ public Builder maxPrice(Double maxPrice) { /** * The highest price if the price is a range. */ - public Builder maxPrice(String maxPrice) { + @NotNull public Builder maxPrice(String maxPrice) { if (this.maxPrice == null) this.maxPrice = new Number(); this.maxPrice.setString(maxPrice); return this; @@ -189,15 +193,15 @@ public Builder maxPrice(String maxPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Integer integer) { + @NotNull public Builder minPrice(int minPrice) { if (this.minPrice == null) this.minPrice = new Number(); - this.minPrice.setInteger(integer); + this.minPrice.setInt(minPrice); return this; } /** * The lowest price if the price is a range. */ - public Builder minPrice(Long minPrice) { + @NotNull public Builder minPrice(long minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setLong(minPrice); return this; @@ -205,7 +209,7 @@ public Builder minPrice(Long minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Float minPrice) { + @NotNull public Builder minPrice(float minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setFloat(minPrice); return this; @@ -213,7 +217,7 @@ public Builder minPrice(Float minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(Double minPrice) { + @NotNull public Builder minPrice(double minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setDouble(minPrice); return this; @@ -221,7 +225,7 @@ public Builder minPrice(Double minPrice) { /** * The lowest price if the price is a range. */ - public Builder minPrice(String minPrice) { + @NotNull public Builder minPrice(String minPrice) { if (this.minPrice == null) this.minPrice = new Number(); this.minPrice.setString(minPrice); return this; @@ -249,7 +253,7 @@ public Builder minPrice(String minPrice) { */ - public Builder price(Number number) { + @NotNull public Builder price(Number number) { if (this.price == null) this.price = new NumberOrString(); this.price.setNumber(number); return this; @@ -277,7 +281,7 @@ public Builder price(Number number) { */ - public Builder price(String price) { + @NotNull public Builder price(String price) { if (this.price == null) this.price = new NumberOrString(); this.price.setString(price); return this; @@ -285,49 +289,49 @@ public Builder price(String price) { /** * The date when the item becomes valid. */ - public Builder validFrom(java.util.Date date) { + @NotNull public Builder validFrom(java.util.Date date) { this.validFrom = date; return this; } /** * The end of the validity of offer, price specification, or opening hours data. */ - public Builder validThrough(java.util.Date date) { + @NotNull public Builder validThrough(java.util.Date date) { this.validThrough = date; return this; } /** * Specifies whether the applicable value-added tax (VAT) is included in the price specification or not. */ - public Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded) { + @NotNull public Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded) { this.valueAddedTaxIncluded = valueAddedTaxIncluded; return this; } /** * The currency (in 3-letter ISO 4217 format) of the price or a price component, when attached to PriceSpecification and its subtypes. */ - public Builder priceCurrency(String priceCurrency) { + @NotNull public Builder priceCurrency(String priceCurrency) { this.priceCurrency = priceCurrency; return this; } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -361,7 +365,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -396,7 +400,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -429,7 +433,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -437,38 +441,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -499,46 +503,46 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder billingIncrement(Integer integer); - Builder billingIncrement(Long billingIncrement); - Builder billingIncrement(Float billingIncrement); - Builder billingIncrement(Double billingIncrement); - Builder billingIncrement(String billingIncrement); - Builder priceType(String priceType); - Builder unitCode(String unitCode); - Builder unitText(String unitText); - Builder eligibleQuantity(QuantitativeValue quantitativeValue); - Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); - Builder eligibleTransactionVolume(PriceSpecification priceSpecification); - Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); - Builder maxPrice(Integer integer); - Builder maxPrice(Long maxPrice); - Builder maxPrice(Float maxPrice); - Builder maxPrice(Double maxPrice); - Builder maxPrice(String maxPrice); - Builder minPrice(Integer integer); - Builder minPrice(Long minPrice); - Builder minPrice(Float minPrice); - Builder minPrice(Double minPrice); - Builder minPrice(String minPrice); - Builder price(Number number); - Builder price(String price); - Builder validFrom(java.util.Date date); - Builder validThrough(java.util.Date date); - Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded); - Builder priceCurrency(String priceCurrency); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder billingIncrement(int billingIncrement); + @NotNull Builder billingIncrement(long billingIncrement); + @NotNull Builder billingIncrement(float billingIncrement); + @NotNull Builder billingIncrement(double billingIncrement); + @NotNull Builder billingIncrement(String billingIncrement); + @NotNull Builder priceType(String priceType); + @NotNull Builder unitCode(String unitCode); + @NotNull Builder unitText(String unitText); + @NotNull Builder eligibleQuantity(QuantitativeValue quantitativeValue); + @NotNull Builder eligibleQuantity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder eligibleTransactionVolume(PriceSpecification priceSpecification); + @NotNull Builder eligibleTransactionVolume(PriceSpecification.Builder priceSpecification); + @NotNull Builder maxPrice(int maxPrice); + @NotNull Builder maxPrice(long maxPrice); + @NotNull Builder maxPrice(float maxPrice); + @NotNull Builder maxPrice(double maxPrice); + @NotNull Builder maxPrice(String maxPrice); + @NotNull Builder minPrice(int minPrice); + @NotNull Builder minPrice(long minPrice); + @NotNull Builder minPrice(float minPrice); + @NotNull Builder minPrice(double minPrice); + @NotNull Builder minPrice(String minPrice); + @NotNull Builder price(Number number); + @NotNull Builder price(String price); + @NotNull Builder validFrom(java.util.Date date); + @NotNull Builder validThrough(java.util.Date date); + @NotNull Builder valueAddedTaxIncluded(Boolean valueAddedTaxIncluded); + @NotNull Builder priceCurrency(String priceCurrency); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/UpdateAction.java b/src/main/java/org/schema/UpdateAction.java index f2f513ff..d1a1c836 100644 --- a/src/main/java/org/schema/UpdateAction.java +++ b/src/main/java/org/schema/UpdateAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of managing by changing/editing the state of the object. */ @@ -31,7 +35,7 @@ public Thing getTargetCollection() { /** * Builder for {@link UpdateAction} */ - public static final class UpdateActionThingBuilder implements Builder { + static final class UpdateActionThingBuilder implements Builder { /** * Creates new {@link UpdateAction} instance. */ @@ -41,20 +45,20 @@ public UpdateAction build() { /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing thing) { + @NotNull public Builder targetCollection(Thing thing) { this.targetCollection = thing; return this; } /** * A sub property of object. The collection target of the action. */ - public Builder targetCollection(Thing.Builder thing) { + @NotNull public Builder targetCollection(Thing.Builder thing) { return this.targetCollection(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -62,13 +66,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -76,7 +80,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -84,7 +88,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -93,67 +97,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -187,7 +191,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -222,7 +226,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -263,38 +267,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -319,32 +323,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder targetCollection(Thing thing); - Builder targetCollection(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder targetCollection(Thing thing); + @NotNull Builder targetCollection(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected UpdateAction(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) { diff --git a/src/main/java/org/schema/Urologic.java b/src/main/java/org/schema/Urologic.java index f1213c42..80f3d96f 100644 --- a/src/main/java/org/schema/Urologic.java +++ b/src/main/java/org/schema/Urologic.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A specific branch of medical science that is concerned with the diagnosis and treatment of diseases pertaining to the urinary tract and the urogenital system. */ @@ -25,7 +29,7 @@ public class Urologic { /** * Builder for {@link Urologic} */ - public static final class UrologicThingBuilder implements Builder { + static final class UrologicThingBuilder implements Builder { /** * Creates new {@link Urologic} instance. */ @@ -34,7 +38,7 @@ public Urologic build() { } } public interface Builder extends ThingBuilder { - + } protected Urologic() { diff --git a/src/main/java/org/schema/UseAction.java b/src/main/java/org/schema/UseAction.java index 47253609..a93a5879 100644 --- a/src/main/java/org/schema/UseAction.java +++ b/src/main/java/org/schema/UseAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of applying an object to its intended purpose. */ @@ -25,7 +29,7 @@ public class UseAction extends ConsumeAction { /** * Builder for {@link UseAction} */ - public static final class UseActionThingBuilder implements Builder { + static final class UseActionThingBuilder implements Builder { /** * Creates new {@link UseAction} instance. */ @@ -35,20 +39,20 @@ public UseAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UsedCondition.java b/src/main/java/org/schema/UsedCondition.java index daee78b3..0a856ac2 100644 --- a/src/main/java/org/schema/UsedCondition.java +++ b/src/main/java/org/schema/UsedCondition.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates that the item is used. */ @@ -25,7 +29,7 @@ public class UsedCondition { /** * Builder for {@link UsedCondition} */ - public static final class UsedConditionThingBuilder implements Builder { + static final class UsedConditionThingBuilder implements Builder { /** * Creates new {@link UsedCondition} instance. */ @@ -34,7 +38,7 @@ public UsedCondition build() { } } public interface Builder extends ThingBuilder { - + } protected UsedCondition() { diff --git a/src/main/java/org/schema/UserBlocks.java b/src/main/java/org/schema/UserBlocks.java index 22a56c0d..a4cd47a3 100644 --- a/src/main/java/org/schema/UserBlocks.java +++ b/src/main/java/org/schema/UserBlocks.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserBlocks extends UserInteraction { /** * Builder for {@link UserBlocks} */ - public static final class UserBlocksThingBuilder implements Builder { + static final class UserBlocksThingBuilder implements Builder { /** * Creates new {@link UserBlocks} instance. */ @@ -37,20 +41,20 @@ public UserBlocks build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UserCheckins.java b/src/main/java/org/schema/UserCheckins.java index ec42e77f..158a1c1e 100644 --- a/src/main/java/org/schema/UserCheckins.java +++ b/src/main/java/org/schema/UserCheckins.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserCheckins extends UserInteraction { /** * Builder for {@link UserCheckins} */ - public static final class UserCheckinsThingBuilder implements Builder { + static final class UserCheckinsThingBuilder implements Builder { /** * Creates new {@link UserCheckins} instance. */ @@ -37,20 +41,20 @@ public UserCheckins build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UserComments.java b/src/main/java/org/schema/UserComments.java index ec4c40c0..2f69bf2b 100644 --- a/src/main/java/org/schema/UserComments.java +++ b/src/main/java/org/schema/UserComments.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -34,7 +38,7 @@ public String getCommentText() { /** * The time at which the UserComment was made. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getCommentTime() { return myCommentTime; } @@ -59,7 +63,7 @@ public String getReplyToUrl() { /** * Builder for {@link UserComments} */ - public static final class UserCommentsThingBuilder implements Builder { + static final class UserCommentsThingBuilder implements Builder { /** * Creates new {@link UserComments} instance. */ @@ -69,21 +73,21 @@ public UserComments build() { /** * The text of the UserComment. */ - public Builder commentText(String commentText) { + @NotNull public Builder commentText(String commentText) { this.commentText = commentText; return this; } /** * The time at which the UserComment was made. */ - public Builder commentTime(java.util.Date date) { + @NotNull public Builder commentTime(java.util.Date date) { this.commentTime = date; return this; } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -91,13 +95,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -105,46 +109,46 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * Specifies the CreativeWork associated with the UserComment. */ - public Builder discusses(CreativeWork creativeWork) { + @NotNull public Builder discusses(CreativeWork creativeWork) { this.discusses = creativeWork; return this; } /** * Specifies the CreativeWork associated with the UserComment. */ - public Builder discusses(CreativeWork.Builder creativeWork) { + @NotNull public Builder discusses(CreativeWork.Builder creativeWork) { return this.discusses(creativeWork.build()); } /** * The URL at which a reply may be posted to the specified UserComment. */ - public Builder replyToUrl(String replyToUrl) { + @NotNull public Builder replyToUrl(String replyToUrl) { this.replyToUrl = replyToUrl; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -152,13 +156,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -166,13 +170,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -180,13 +184,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -194,53 +198,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -248,13 +252,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -262,20 +266,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -283,13 +287,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -297,113 +301,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -437,7 +441,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -472,7 +476,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -505,7 +509,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -513,38 +517,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -585,65 +589,65 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder commentText(String commentText); - Builder commentTime(java.util.Date date); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder discusses(CreativeWork creativeWork); - Builder discusses(CreativeWork.Builder creativeWork); - Builder replyToUrl(String replyToUrl); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder commentText(String commentText); + @NotNull Builder commentTime(java.util.Date date); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder discusses(CreativeWork creativeWork); + @NotNull Builder discusses(CreativeWork.Builder creativeWork); + @NotNull Builder replyToUrl(String replyToUrl); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected UserComments(String commentText, java.util.Date commentTime, OrganizationOrPerson creator, CreativeWork discusses, String replyToUrl, 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) { diff --git a/src/main/java/org/schema/UserDownloads.java b/src/main/java/org/schema/UserDownloads.java index 30c524dd..3ae787ff 100644 --- a/src/main/java/org/schema/UserDownloads.java +++ b/src/main/java/org/schema/UserDownloads.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserDownloads extends UserInteraction { /** * Builder for {@link UserDownloads} */ - public static final class UserDownloadsThingBuilder implements Builder { + static final class UserDownloadsThingBuilder implements Builder { /** * Creates new {@link UserDownloads} instance. */ @@ -37,20 +41,20 @@ public UserDownloads build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UserInteraction.java b/src/main/java/org/schema/UserInteraction.java index e95de183..b545e9da 100644 --- a/src/main/java/org/schema/UserInteraction.java +++ b/src/main/java/org/schema/UserInteraction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserInteraction extends Event { /** * Builder for {@link UserInteraction} */ - public static final class UserInteractionThingBuilder implements Builder { + static final class UserInteractionThingBuilder implements Builder { /** * Creates new {@link UserInteraction} instance. */ @@ -37,20 +41,20 @@ public UserInteraction build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UserLikes.java b/src/main/java/org/schema/UserLikes.java index 1b941844..e4c6e6e3 100644 --- a/src/main/java/org/schema/UserLikes.java +++ b/src/main/java/org/schema/UserLikes.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserLikes extends UserInteraction { /** * Builder for {@link UserLikes} */ - public static final class UserLikesThingBuilder implements Builder { + static final class UserLikesThingBuilder implements Builder { /** * Creates new {@link UserLikes} instance. */ @@ -37,20 +41,20 @@ public UserLikes build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UserPageVisits.java b/src/main/java/org/schema/UserPageVisits.java index 4400a0ab..2595e5ed 100644 --- a/src/main/java/org/schema/UserPageVisits.java +++ b/src/main/java/org/schema/UserPageVisits.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserPageVisits extends UserInteraction { /** * Builder for {@link UserPageVisits} */ - public static final class UserPageVisitsThingBuilder implements Builder { + static final class UserPageVisitsThingBuilder implements Builder { /** * Creates new {@link UserPageVisits} instance. */ @@ -37,20 +41,20 @@ public UserPageVisits build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UserPlays.java b/src/main/java/org/schema/UserPlays.java index 864fc4c1..38ad26e9 100644 --- a/src/main/java/org/schema/UserPlays.java +++ b/src/main/java/org/schema/UserPlays.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserPlays extends UserInteraction { /** * Builder for {@link UserPlays} */ - public static final class UserPlaysThingBuilder implements Builder { + static final class UserPlaysThingBuilder implements Builder { /** * Creates new {@link UserPlays} instance. */ @@ -37,20 +41,20 @@ public UserPlays build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UserPlusOnes.java b/src/main/java/org/schema/UserPlusOnes.java index 0976836c..cdf0e0d5 100644 --- a/src/main/java/org/schema/UserPlusOnes.java +++ b/src/main/java/org/schema/UserPlusOnes.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserPlusOnes extends UserInteraction { /** * Builder for {@link UserPlusOnes} */ - public static final class UserPlusOnesThingBuilder implements Builder { + static final class UserPlusOnesThingBuilder implements Builder { /** * Creates new {@link UserPlusOnes} instance. */ @@ -37,20 +41,20 @@ public UserPlusOnes build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/UserTweets.java b/src/main/java/org/schema/UserTweets.java index b652ece6..8819395a 100644 --- a/src/main/java/org/schema/UserTweets.java +++ b/src/main/java/org/schema/UserTweets.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * UserInteraction and its subtypes is an old way of talking about users interacting with pages. It is generally better to use * Action-based vocabulary, alongside types such as Comment. @@ -27,7 +31,7 @@ public class UserTweets extends UserInteraction { /** * Builder for {@link UserTweets} */ - public static final class UserTweetsThingBuilder implements Builder { + static final class UserTweetsThingBuilder implements Builder { /** * Creates new {@link UserTweets} instance. */ @@ -37,20 +41,20 @@ public UserTweets build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -58,13 +62,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -72,13 +76,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -86,13 +90,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -100,53 +104,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -154,13 +158,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -168,20 +172,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -189,13 +193,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -203,113 +207,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -343,7 +347,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -378,7 +382,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -411,7 +415,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -419,38 +423,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -486,56 +490,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Vehicle.java b/src/main/java/org/schema/Vehicle.java index 5ab9897f..90c7d892 100644 --- a/src/main/java/org/schema/Vehicle.java +++ b/src/main/java/org/schema/Vehicle.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A vehicle is a device that is designed or used to transport people or cargo over land, water, air, or through space. */ @@ -105,7 +109,7 @@ public String getKnownVehicleDamages() { /** * The date of the first registration of the vehicle with the respective public authorities. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getDateVehicleFirstRegistered() { return myDateVehicleFirstRegistered; } @@ -143,7 +147,7 @@ public QuantitativeValue getMileageFromOdometer() { /** * The release date of a vehicle model (often used to differentiate versions of the same make and model). */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getVehicleModelDate() { return myVehicleModelDate; } @@ -157,14 +161,14 @@ public NumberOrQuantitativeValue getNumberOfPreviousOwners() { /** * The date of production of the item, e.g. vehicle. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getProductionDate() { return myProductionDate; } /** * The date the item e.g. vehicle was purchased by the current owner. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getPurchaseDate() { return myPurchaseDate; } @@ -190,7 +194,7 @@ public SteeringPositionValue getSteeringPosition() { /** * Builder for {@link Vehicle} */ - public static final class VehicleThingBuilder implements Builder { + static final class VehicleThingBuilder implements Builder { /** * Creates new {@link Vehicle} instance. */ @@ -201,7 +205,7 @@ public Vehicle build() { * The number of doors.
Typical unit code(s): C62 */ - public Builder numberOfDoors(Number number) { + @NotNull public Builder numberOfDoors(Number number) { if (this.numberOfDoors == null) this.numberOfDoors = new NumberOrQuantitativeValue(); this.numberOfDoors.setNumber(number); return this; @@ -210,7 +214,7 @@ public Builder numberOfDoors(Number number) { * The number of doors.
Typical unit code(s): C62 */ - public Builder numberOfDoors(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfDoors(QuantitativeValue quantitativeValue) { if (this.numberOfDoors == null) this.numberOfDoors = new NumberOrQuantitativeValue(); this.numberOfDoors.setQuantitativeValue(quantitativeValue); return this; @@ -219,13 +223,13 @@ public Builder numberOfDoors(QuantitativeValue quantitativeValue) { * The number of doors.
Typical unit code(s): C62 */ - public Builder numberOfDoors(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfDoors(QuantitativeValue.Builder quantitativeValue) { return this.numberOfDoors(quantitativeValue.build()); } /** * The number or type of airbags in the vehicle. */ - public Builder numberOfAirbags(Number number) { + @NotNull public Builder numberOfAirbags(Number number) { if (this.numberOfAirbags == null) this.numberOfAirbags = new NumberOrString(); this.numberOfAirbags.setNumber(number); return this; @@ -233,7 +237,7 @@ public Builder numberOfAirbags(Number number) { /** * The number or type of airbags in the vehicle. */ - public Builder numberOfAirbags(String numberOfAirbags) { + @NotNull public Builder numberOfAirbags(String numberOfAirbags) { if (this.numberOfAirbags == null) this.numberOfAirbags = new NumberOrString(); this.numberOfAirbags.setString(numberOfAirbags); return this; @@ -242,7 +246,7 @@ public Builder numberOfAirbags(String numberOfAirbags) { * The number of axles.
Typical unit code(s): C62 */ - public Builder numberOfAxles(Number number) { + @NotNull public Builder numberOfAxles(Number number) { if (this.numberOfAxles == null) this.numberOfAxles = new NumberOrQuantitativeValue(); this.numberOfAxles.setNumber(number); return this; @@ -251,7 +255,7 @@ public Builder numberOfAxles(Number number) { * The number of axles.
Typical unit code(s): C62 */ - public Builder numberOfAxles(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfAxles(QuantitativeValue quantitativeValue) { if (this.numberOfAxles == null) this.numberOfAxles = new NumberOrQuantitativeValue(); this.numberOfAxles.setQuantitativeValue(quantitativeValue); return this; @@ -260,20 +264,20 @@ public Builder numberOfAxles(QuantitativeValue quantitativeValue) { * The number of axles.
Typical unit code(s): C62 */ - public Builder numberOfAxles(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfAxles(QuantitativeValue.Builder quantitativeValue) { return this.numberOfAxles(quantitativeValue.build()); } /** * Information about the engine or engines of the vehicle. */ - public Builder vehicleEngine(EngineSpecification engineSpecification) { + @NotNull public Builder vehicleEngine(EngineSpecification engineSpecification) { this.vehicleEngine = engineSpecification; return this; } /** * Information about the engine or engines of the vehicle. */ - public Builder vehicleEngine(EngineSpecification.Builder engineSpecification) { + @NotNull public Builder vehicleEngine(EngineSpecification.Builder engineSpecification) { return this.vehicleEngine(engineSpecification.build()); } /** @@ -283,7 +287,7 @@ public Builder vehicleEngine(EngineSpecification.Builder engineSpecification) { Note 2: There are two ways of indicating the fuel consumption, fuelConsumption (e.g. 8 liters per 100 km) and fuelEfficiency (e.g. 30 miles per gallon). They are reciprocal.
Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use valueReference to link the value for the fuel consumption to another value. */ - public Builder fuelConsumption(QuantitativeValue quantitativeValue) { + @NotNull public Builder fuelConsumption(QuantitativeValue quantitativeValue) { this.fuelConsumption = quantitativeValue; return this; } @@ -294,7 +298,7 @@ public Builder fuelConsumption(QuantitativeValue quantitativeValue) { Note 2: There are two ways of indicating the fuel consumption, fuelConsumption (e.g. 8 liters per 100 km) and fuelEfficiency (e.g. 30 miles per gallon). They are reciprocal.
Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use valueReference to link the value for the fuel consumption to another value. */ - public Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue) { return this.fuelConsumption(quantitativeValue.build()); } /** @@ -304,7 +308,7 @@ public Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue) { Note 2: There are two ways of indicating the fuel consumption, fuelConsumption (e.g. 8 liters per 100 km) and fuelEfficiency (e.g. 30 miles per gallon). They are reciprocal.
Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use valueReference to link the value for the fuel economy to another value. */ - public Builder fuelEfficiency(QuantitativeValue quantitativeValue) { + @NotNull public Builder fuelEfficiency(QuantitativeValue quantitativeValue) { this.fuelEfficiency = quantitativeValue; return this; } @@ -315,14 +319,14 @@ public Builder fuelEfficiency(QuantitativeValue quantitativeValue) { Note 2: There are two ways of indicating the fuel consumption, fuelConsumption (e.g. 8 liters per 100 km) and fuelEfficiency (e.g. 30 miles per gallon). They are reciprocal.
Note 3: Often, the absolute value is useful only when related to driving speed ("at 80 km/h") or usage pattern ("city traffic"). You can use valueReference to link the value for the fuel economy to another value. */ - public Builder fuelEfficiency(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder fuelEfficiency(QuantitativeValue.Builder quantitativeValue) { return this.fuelEfficiency(quantitativeValue.build()); } /** * The total number of forward gears available for the transmission system of the vehicle.
Typical unit code(s): C62 */ - public Builder numberOfForwardGears(Number number) { + @NotNull public Builder numberOfForwardGears(Number number) { if (this.numberOfForwardGears == null) this.numberOfForwardGears = new NumberOrQuantitativeValue(); this.numberOfForwardGears.setNumber(number); return this; @@ -331,7 +335,7 @@ public Builder numberOfForwardGears(Number number) { * The total number of forward gears available for the transmission system of the vehicle.
Typical unit code(s): C62 */ - public Builder numberOfForwardGears(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfForwardGears(QuantitativeValue quantitativeValue) { if (this.numberOfForwardGears == null) this.numberOfForwardGears = new NumberOrQuantitativeValue(); this.numberOfForwardGears.setQuantitativeValue(quantitativeValue); return this; @@ -340,13 +344,13 @@ public Builder numberOfForwardGears(QuantitativeValue quantitativeValue) { * The total number of forward gears available for the transmission system of the vehicle.
Typical unit code(s): C62 */ - public Builder numberOfForwardGears(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfForwardGears(QuantitativeValue.Builder quantitativeValue) { return this.numberOfForwardGears(quantitativeValue.build()); } /** * The Vehicle Identification Number (VIN) is a unique serial number used by the automotive industry to identify individual motor vehicles. */ - public Builder vin(String vin) { + @NotNull public Builder vin(String vin) { this.vin = vin; return this; } @@ -356,7 +360,7 @@ Typical unit code(s): LTR for liters, FTQ for cubic foot/feet
Note: You can use minValue and maxValue to indicate ranges. */ - public Builder cargoVolume(QuantitativeValue quantitativeValue) { + @NotNull public Builder cargoVolume(QuantitativeValue quantitativeValue) { this.cargoVolume = quantitativeValue; return this; } @@ -366,34 +370,34 @@ Typical unit code(s): LTR for liters, FTQ for cubic foot/feet
Note: You can use minValue and maxValue to indicate ranges. */ - public Builder cargoVolume(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder cargoVolume(QuantitativeValue.Builder quantitativeValue) { return this.cargoVolume(quantitativeValue.build()); } /** * A short text indicating the configuration of the vehicle, e.g. '5dr hatchback ST 2.5 MT 225 hp' or 'limited edition'. */ - public Builder vehicleConfiguration(String vehicleConfiguration) { + @NotNull public Builder vehicleConfiguration(String vehicleConfiguration) { this.vehicleConfiguration = vehicleConfiguration; return this; } /** * A textual description of known damages, both repaired and unrepaired. */ - public Builder knownVehicleDamages(String knownVehicleDamages) { + @NotNull public Builder knownVehicleDamages(String knownVehicleDamages) { this.knownVehicleDamages = knownVehicleDamages; return this; } /** * The date of the first registration of the vehicle with the respective public authorities. */ - public Builder dateVehicleFirstRegistered(java.util.Date date) { + @NotNull public Builder dateVehicleFirstRegistered(java.util.Date date) { this.dateVehicleFirstRegistered = date; return this; } /** * The drive wheel configuration, i.e. which roadwheels will receive torque from the vehicle's engine via the drivetrain. */ - public Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelConfigurationValue) { + @NotNull public Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelConfigurationValue) { if (this.driveWheelConfiguration == null) this.driveWheelConfiguration = new DriveWheelConfigurationValueOrString(); this.driveWheelConfiguration.setDriveWheelConfigurationValue(driveWheelConfigurationValue); return this; @@ -401,13 +405,13 @@ public Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelCo /** * The drive wheel configuration, i.e. which roadwheels will receive torque from the vehicle's engine via the drivetrain. */ - public Builder driveWheelConfiguration(DriveWheelConfigurationValue.Builder driveWheelConfigurationValue) { + @NotNull public Builder driveWheelConfiguration(DriveWheelConfigurationValue.Builder driveWheelConfigurationValue) { return this.driveWheelConfiguration(driveWheelConfigurationValue.build()); } /** * The drive wheel configuration, i.e. which roadwheels will receive torque from the vehicle's engine via the drivetrain. */ - public Builder driveWheelConfiguration(String driveWheelConfiguration) { + @NotNull public Builder driveWheelConfiguration(String driveWheelConfiguration) { if (this.driveWheelConfiguration == null) this.driveWheelConfiguration = new DriveWheelConfigurationValueOrString(); this.driveWheelConfiguration.setString(driveWheelConfiguration); return this; @@ -415,7 +419,7 @@ public Builder driveWheelConfiguration(String driveWheelConfiguration) { /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(QualitativeValue qualitativeValue) { + @NotNull public Builder fuelType(QualitativeValue qualitativeValue) { if (this.fuelType == null) this.fuelType = new QualitativeValueOrString(); this.fuelType.setQualitativeValue(qualitativeValue); return this; @@ -423,13 +427,13 @@ public Builder fuelType(QualitativeValue qualitativeValue) { /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder fuelType(QualitativeValue.Builder qualitativeValue) { return this.fuelType(qualitativeValue.build()); } /** * The type of fuel suitable for the engine or engines of the vehicle. If the vehicle has only one engine, this property can be attached directly to the vehicle. */ - public Builder fuelType(String fuelType) { + @NotNull public Builder fuelType(String fuelType) { if (this.fuelType == null) this.fuelType = new QualitativeValueOrString(); this.fuelType.setString(fuelType); return this; @@ -437,14 +441,14 @@ public Builder fuelType(String fuelType) { /** * The color or color combination of the interior of the vehicle. */ - public Builder vehicleInteriorColor(String vehicleInteriorColor) { + @NotNull public Builder vehicleInteriorColor(String vehicleInteriorColor) { this.vehicleInteriorColor = vehicleInteriorColor; return this; } /** * The type or material of the interior of the vehicle (e.g. synthetic fabric, leather, wood, etc.). While most interior types are characterized by the material used, an interior type can also be based on vehicle usage or target audience. */ - public Builder vehicleInteriorType(String vehicleInteriorType) { + @NotNull public Builder vehicleInteriorType(String vehicleInteriorType) { this.vehicleInteriorType = vehicleInteriorType; return this; } @@ -452,7 +456,7 @@ public Builder vehicleInteriorType(String vehicleInteriorType) { * The total distance travelled by the particular vehicle since its initial production, as read from its odometer.
Typical unit code(s): KMT for kilometers, SMI for statute miles */ - public Builder mileageFromOdometer(QuantitativeValue quantitativeValue) { + @NotNull public Builder mileageFromOdometer(QuantitativeValue quantitativeValue) { this.mileageFromOdometer = quantitativeValue; return this; } @@ -460,13 +464,13 @@ public Builder mileageFromOdometer(QuantitativeValue quantitativeValue) { * The total distance travelled by the particular vehicle since its initial production, as read from its odometer.
Typical unit code(s): KMT for kilometers, SMI for statute miles */ - public Builder mileageFromOdometer(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder mileageFromOdometer(QuantitativeValue.Builder quantitativeValue) { return this.mileageFromOdometer(quantitativeValue.build()); } /** * The release date of a vehicle model (often used to differentiate versions of the same make and model). */ - public Builder vehicleModelDate(java.util.Date date) { + @NotNull public Builder vehicleModelDate(java.util.Date date) { this.vehicleModelDate = date; return this; } @@ -474,7 +478,7 @@ public Builder vehicleModelDate(java.util.Date date) { * The number of owners of the vehicle, including the current one.
Typical unit code(s): C62 */ - public Builder numberOfPreviousOwners(Number number) { + @NotNull public Builder numberOfPreviousOwners(Number number) { if (this.numberOfPreviousOwners == null) this.numberOfPreviousOwners = new NumberOrQuantitativeValue(); this.numberOfPreviousOwners.setNumber(number); return this; @@ -483,7 +487,7 @@ public Builder numberOfPreviousOwners(Number number) { * The number of owners of the vehicle, including the current one.
Typical unit code(s): C62 */ - public Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue) { if (this.numberOfPreviousOwners == null) this.numberOfPreviousOwners = new NumberOrQuantitativeValue(); this.numberOfPreviousOwners.setQuantitativeValue(quantitativeValue); return this; @@ -492,20 +496,20 @@ public Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue) { * The number of owners of the vehicle, including the current one.
Typical unit code(s): C62 */ - public Builder numberOfPreviousOwners(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfPreviousOwners(QuantitativeValue.Builder quantitativeValue) { return this.numberOfPreviousOwners(quantitativeValue.build()); } /** * The date of production of the item, e.g. vehicle. */ - public Builder productionDate(java.util.Date date) { + @NotNull public Builder productionDate(java.util.Date date) { this.productionDate = date; return this; } /** * The date the item e.g. vehicle was purchased by the current owner. */ - public Builder purchaseDate(java.util.Date date) { + @NotNull public Builder purchaseDate(java.util.Date date) { this.purchaseDate = date; return this; } @@ -513,7 +517,7 @@ public Builder purchaseDate(java.util.Date date) { * The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.
Typical unit code(s): C62 for persons */ - public Builder vehicleSeatingCapacity(Number number) { + @NotNull public Builder vehicleSeatingCapacity(Number number) { if (this.vehicleSeatingCapacity == null) this.vehicleSeatingCapacity = new NumberOrQuantitativeValue(); this.vehicleSeatingCapacity.setNumber(number); return this; @@ -522,7 +526,7 @@ public Builder vehicleSeatingCapacity(Number number) { * The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.
Typical unit code(s): C62 for persons */ - public Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue) { + @NotNull public Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue) { if (this.vehicleSeatingCapacity == null) this.vehicleSeatingCapacity = new NumberOrQuantitativeValue(); this.vehicleSeatingCapacity.setQuantitativeValue(quantitativeValue); return this; @@ -531,13 +535,13 @@ public Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue) { * The number of passengers that can be seated in the vehicle, both in terms of the physical space available, and in terms of limitations set by law.
Typical unit code(s): C62 for persons */ - public Builder vehicleSeatingCapacity(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder vehicleSeatingCapacity(QuantitativeValue.Builder quantitativeValue) { return this.vehicleSeatingCapacity(quantitativeValue.build()); } /** * The type of component used for transmitting the power from a rotating power source to the wheels or other relevant component(s) ("gearbox" for cars). */ - public Builder vehicleTransmission(QualitativeValue qualitativeValue) { + @NotNull public Builder vehicleTransmission(QualitativeValue qualitativeValue) { if (this.vehicleTransmission == null) this.vehicleTransmission = new QualitativeValueOrString(); this.vehicleTransmission.setQualitativeValue(qualitativeValue); return this; @@ -545,13 +549,13 @@ public Builder vehicleTransmission(QualitativeValue qualitativeValue) { /** * The type of component used for transmitting the power from a rotating power source to the wheels or other relevant component(s) ("gearbox" for cars). */ - public Builder vehicleTransmission(QualitativeValue.Builder qualitativeValue) { + @NotNull public Builder vehicleTransmission(QualitativeValue.Builder qualitativeValue) { return this.vehicleTransmission(qualitativeValue.build()); } /** * The type of component used for transmitting the power from a rotating power source to the wheels or other relevant component(s) ("gearbox" for cars). */ - public Builder vehicleTransmission(String vehicleTransmission) { + @NotNull public Builder vehicleTransmission(String vehicleTransmission) { if (this.vehicleTransmission == null) this.vehicleTransmission = new QualitativeValueOrString(); this.vehicleTransmission.setString(vehicleTransmission); return this; @@ -559,53 +563,53 @@ public Builder vehicleTransmission(String vehicleTransmission) { /** * The position of the steering wheel or similar device (mostly for cars). */ - public Builder steeringPosition(SteeringPositionValue steeringPositionValue) { + @NotNull public Builder steeringPosition(SteeringPositionValue steeringPositionValue) { this.steeringPosition = steeringPositionValue; return this; } /** * The position of the steering wheel or similar device (mostly for cars). */ - public Builder steeringPosition(SteeringPositionValue.Builder steeringPositionValue) { + @NotNull public Builder steeringPosition(SteeringPositionValue.Builder steeringPositionValue) { return this.steeringPosition(steeringPositionValue.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand brand) { + @NotNull public Builder brand(Brand brand) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setBrand(brand); return this; @@ -613,13 +617,13 @@ public Builder brand(Brand brand) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Brand.Builder brand) { + @NotNull public Builder brand(Brand.Builder brand) { return this.brand(brand.build()); } /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization organization) { + @NotNull public Builder brand(Organization organization) { if (this.brand == null) this.brand = new BrandOrOrganization(); this.brand.setOrganization(organization); return this; @@ -627,13 +631,13 @@ public Builder brand(Organization organization) { /** * The brand(s) associated with a product or service, or the brand(s) maintained by an organization or business person. */ - public Builder brand(Organization.Builder organization) { + @NotNull public Builder brand(Organization.Builder organization) { return this.brand(organization.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory physicalActivityCategory) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setPhysicalActivityCategory(physicalActivityCategory); return this; @@ -641,13 +645,13 @@ public Builder category(PhysicalActivityCategory physicalActivityCategory) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { + @NotNull public Builder category(PhysicalActivityCategory.Builder physicalActivityCategory) { return this.category(physicalActivityCategory.build()); } /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(String category) { + @NotNull public Builder category(String category) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setString(category); return this; @@ -655,7 +659,7 @@ public Builder category(String category) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing thing) { + @NotNull public Builder category(Thing thing) { if (this.category == null) this.category = new PhysicalActivityCategoryOrStringOrThing(); this.category.setThing(thing); return this; @@ -663,20 +667,20 @@ public Builder category(Thing thing) { /** * A category for the item. Greater signs or slashes can be used to informally indicate a category hierarchy. */ - public Builder category(Thing.Builder thing) { + @NotNull public Builder category(Thing.Builder thing) { return this.category(thing.build()); } /** * The color of the product. */ - public Builder color(String color) { + @NotNull public Builder color(String color) { this.color = color; return this; } /** * The depth of the item. */ - public Builder depth(Distance distance) { + @NotNull public Builder depth(Distance distance) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setDistance(distance); return this; @@ -684,13 +688,13 @@ public Builder depth(Distance distance) { /** * The depth of the item. */ - public Builder depth(Distance.Builder distance) { + @NotNull public Builder depth(Distance.Builder distance) { return this.depth(distance.build()); } /** * The depth of the item. */ - public Builder depth(QuantitativeValue quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue quantitativeValue) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setQuantitativeValue(quantitativeValue); return this; @@ -698,41 +702,41 @@ public Builder depth(QuantitativeValue quantitativeValue) { /** * The depth of the item. */ - public Builder depth(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue.Builder quantitativeValue) { return this.depth(quantitativeValue.build()); } /** * The GTIN-12 code of the product, or the product to which the offer refers. The GTIN-12 is the 12-digit GS1 Identification Key composed of a U.P.C. Company Prefix, Item Reference, and Check Digit used to identify trade items. See GS1 GTIN Summary for more details. */ - public Builder gtin12(String gtin12) { + @NotNull public Builder gtin12(String gtin12) { this.gtin12 = gtin12; return this; } /** * The GTIN-13 code of the product, or the product to which the offer refers. This is equivalent to 13-digit ISBN codes and EAN UCC-13. Former 12-digit UPC codes can be converted into a GTIN-13 code by simply adding a preceeding zero. See GS1 GTIN Summary for more details. */ - public Builder gtin13(String gtin13) { + @NotNull public Builder gtin13(String gtin13) { this.gtin13 = gtin13; return this; } /** * The GTIN-14 code of the product, or the product to which the offer refers. See GS1 GTIN Summary for more details. */ - public Builder gtin14(String gtin14) { + @NotNull public Builder gtin14(String gtin14) { this.gtin14 = gtin14; return this; } /** * The GTIN-8 code of the product, or the product to which the offer refers. This code is also known as EAN/UCC-8 or 8-digit EAN. See GS1 GTIN Summary for more details. */ - public Builder gtin8(String gtin8) { + @NotNull public Builder gtin8(String gtin8) { this.gtin8 = gtin8; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -740,13 +744,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -754,78 +758,78 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product product) { this.isAccessoryOrSparePartFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is an accessory or spare part. */ - public Builder isAccessoryOrSparePartFor(Product.Builder product) { + @NotNull public Builder isAccessoryOrSparePartFor(Product.Builder product) { return this.isAccessoryOrSparePartFor(product.build()); } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product product) { + @NotNull public Builder isConsumableFor(Product product) { this.isConsumableFor = product; return this; } /** * A pointer to another product (or multiple products) for which this product is a consumable. */ - public Builder isConsumableFor(Product.Builder product) { + @NotNull public Builder isConsumableFor(Product.Builder product) { return this.isConsumableFor(product.build()); } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product product) { + @NotNull public Builder isRelatedTo(Product product) { this.isRelatedTo = product; return this; } /** * A pointer to another, somehow related product (or multiple products). */ - public Builder isRelatedTo(Product.Builder product) { + @NotNull public Builder isRelatedTo(Product.Builder product) { return this.isRelatedTo(product.build()); } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product product) { + @NotNull public Builder isSimilarTo(Product product) { this.isSimilarTo = product; return this; } /** * A pointer to another, functionally similar product (or multiple products). */ - public Builder isSimilarTo(Product.Builder product) { + @NotNull public Builder isSimilarTo(Product.Builder product) { return this.isSimilarTo(product.build()); } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition offerItemCondition) { this.itemCondition = offerItemCondition; return this; } /** * A predefined value from OfferItemCondition or a textual description of the condition of the product or service, or the products or services included in the offer. */ - public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { + @NotNull public Builder itemCondition(OfferItemCondition.Builder offerItemCondition) { return this.itemCondition(offerItemCondition.build()); } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -833,13 +837,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -847,20 +851,20 @@ public Builder logo(String logo) { /** * The manufacturer of the product. */ - public Builder manufacturer(Organization organization) { + @NotNull public Builder manufacturer(Organization organization) { this.manufacturer = organization; return this; } /** * The manufacturer of the product. */ - public Builder manufacturer(Organization.Builder organization) { + @NotNull public Builder manufacturer(Organization.Builder organization) { return this.manufacturer(organization.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel productModel) { + @NotNull public Builder model(ProductModel productModel) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setProductModel(productModel); return this; @@ -868,13 +872,13 @@ public Builder model(ProductModel productModel) { /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(ProductModel.Builder productModel) { + @NotNull public Builder model(ProductModel.Builder productModel) { return this.model(productModel.build()); } /** * The model of the product. Use with the URL of a ProductModel or a textual representation of the model identifier. The URL of the ProductModel can be from an external source. It is recommended to additionally provide strong product identifiers via the gtin8/gtin13/gtin14 and mpn properties. */ - public Builder model(String model) { + @NotNull public Builder model(String model) { if (this.model == null) this.model = new ProductModelOrString(); this.model.setString(model); return this; @@ -882,74 +886,74 @@ public Builder model(String model) { /** * The Manufacturer Part Number (MPN) of the product, or the product to which the offer refers. */ - public Builder mpn(String mpn) { + @NotNull public Builder mpn(String mpn) { this.mpn = mpn; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The product identifier, such as ISBN. For example: <meta itemprop='productID' content='isbn:123-456-789'/>. */ - public Builder productID(String productID) { + @NotNull public Builder productID(String productID) { this.productID = productID; return this; } /** * The release date of a product or product model. This can be used to distinguish the exact variant of a product. */ - public Builder releaseDate(java.util.Date date) { + @NotNull public Builder releaseDate(java.util.Date date) { this.releaseDate = date; return this; } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Stock Keeping Unit (SKU), i.e. a merchant-specific identifier for a product or service, or the product to which the offer refers. */ - public Builder sku(String sku) { + @NotNull public Builder sku(String sku) { this.sku = sku; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue quantitativeValue) { this.weight = quantitativeValue; return this; } /** * The weight of the product or person. */ - public Builder weight(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder weight(QuantitativeValue.Builder quantitativeValue) { return this.weight(quantitativeValue.build()); } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -957,13 +961,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -971,7 +975,7 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** @@ -980,7 +984,7 @@ public Builder width(QuantitativeValue.Builder quantitativeValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -990,27 +994,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1044,7 +1048,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1079,7 +1083,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1112,7 +1116,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1120,38 +1124,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1222,126 +1226,126 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder numberOfDoors(Number number); - Builder numberOfDoors(QuantitativeValue quantitativeValue); - Builder numberOfDoors(QuantitativeValue.Builder quantitativeValue); - Builder numberOfAirbags(Number number); - Builder numberOfAirbags(String numberOfAirbags); - Builder numberOfAxles(Number number); - Builder numberOfAxles(QuantitativeValue quantitativeValue); - Builder numberOfAxles(QuantitativeValue.Builder quantitativeValue); - Builder vehicleEngine(EngineSpecification engineSpecification); - Builder vehicleEngine(EngineSpecification.Builder engineSpecification); - Builder fuelConsumption(QuantitativeValue quantitativeValue); - Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue); - Builder fuelEfficiency(QuantitativeValue quantitativeValue); - Builder fuelEfficiency(QuantitativeValue.Builder quantitativeValue); - Builder numberOfForwardGears(Number number); - Builder numberOfForwardGears(QuantitativeValue quantitativeValue); - Builder numberOfForwardGears(QuantitativeValue.Builder quantitativeValue); - Builder vin(String vin); - Builder cargoVolume(QuantitativeValue quantitativeValue); - Builder cargoVolume(QuantitativeValue.Builder quantitativeValue); - Builder vehicleConfiguration(String vehicleConfiguration); - Builder knownVehicleDamages(String knownVehicleDamages); - Builder dateVehicleFirstRegistered(java.util.Date date); - Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelConfigurationValue); - Builder driveWheelConfiguration(DriveWheelConfigurationValue.Builder driveWheelConfigurationValue); - Builder driveWheelConfiguration(String driveWheelConfiguration); - Builder fuelType(QualitativeValue qualitativeValue); - Builder fuelType(QualitativeValue.Builder qualitativeValue); - Builder fuelType(String fuelType); - Builder vehicleInteriorColor(String vehicleInteriorColor); - Builder vehicleInteriorType(String vehicleInteriorType); - Builder mileageFromOdometer(QuantitativeValue quantitativeValue); - Builder mileageFromOdometer(QuantitativeValue.Builder quantitativeValue); - Builder vehicleModelDate(java.util.Date date); - Builder numberOfPreviousOwners(Number number); - Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue); - Builder numberOfPreviousOwners(QuantitativeValue.Builder quantitativeValue); - Builder productionDate(java.util.Date date); - Builder purchaseDate(java.util.Date date); - Builder vehicleSeatingCapacity(Number number); - Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue); - Builder vehicleSeatingCapacity(QuantitativeValue.Builder quantitativeValue); - Builder vehicleTransmission(QualitativeValue qualitativeValue); - Builder vehicleTransmission(QualitativeValue.Builder qualitativeValue); - Builder vehicleTransmission(String vehicleTransmission); - Builder steeringPosition(SteeringPositionValue steeringPositionValue); - Builder steeringPosition(SteeringPositionValue.Builder steeringPositionValue); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder award(String award); - Builder brand(Brand brand); - Builder brand(Brand.Builder brand); - Builder brand(Organization organization); - Builder brand(Organization.Builder organization); - Builder category(PhysicalActivityCategory physicalActivityCategory); - Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); - Builder category(String category); - Builder category(Thing thing); - Builder category(Thing.Builder thing); - Builder color(String color); - Builder depth(Distance distance); - Builder depth(Distance.Builder distance); - Builder depth(QuantitativeValue quantitativeValue); - Builder depth(QuantitativeValue.Builder quantitativeValue); - Builder gtin12(String gtin12); - Builder gtin13(String gtin13); - Builder gtin14(String gtin14); - Builder gtin8(String gtin8); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder isAccessoryOrSparePartFor(Product product); - Builder isAccessoryOrSparePartFor(Product.Builder product); - Builder isConsumableFor(Product product); - Builder isConsumableFor(Product.Builder product); - Builder isRelatedTo(Product product); - Builder isRelatedTo(Product.Builder product); - Builder isSimilarTo(Product product); - Builder isSimilarTo(Product.Builder product); - Builder itemCondition(OfferItemCondition offerItemCondition); - Builder itemCondition(OfferItemCondition.Builder offerItemCondition); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder manufacturer(Organization organization); - Builder manufacturer(Organization.Builder organization); - Builder model(ProductModel productModel); - Builder model(ProductModel.Builder productModel); - Builder model(String model); - Builder mpn(String mpn); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder productID(String productID); - Builder releaseDate(java.util.Date date); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sku(String sku); - Builder weight(QuantitativeValue quantitativeValue); - Builder weight(QuantitativeValue.Builder quantitativeValue); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder numberOfDoors(Number number); + @NotNull Builder numberOfDoors(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfDoors(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder numberOfAirbags(Number number); + @NotNull Builder numberOfAirbags(String numberOfAirbags); + @NotNull Builder numberOfAxles(Number number); + @NotNull Builder numberOfAxles(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfAxles(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vehicleEngine(EngineSpecification engineSpecification); + @NotNull Builder vehicleEngine(EngineSpecification.Builder engineSpecification); + @NotNull Builder fuelConsumption(QuantitativeValue quantitativeValue); + @NotNull Builder fuelConsumption(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder fuelEfficiency(QuantitativeValue quantitativeValue); + @NotNull Builder fuelEfficiency(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder numberOfForwardGears(Number number); + @NotNull Builder numberOfForwardGears(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfForwardGears(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vin(String vin); + @NotNull Builder cargoVolume(QuantitativeValue quantitativeValue); + @NotNull Builder cargoVolume(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vehicleConfiguration(String vehicleConfiguration); + @NotNull Builder knownVehicleDamages(String knownVehicleDamages); + @NotNull Builder dateVehicleFirstRegistered(java.util.Date date); + @NotNull Builder driveWheelConfiguration(DriveWheelConfigurationValue driveWheelConfigurationValue); + @NotNull Builder driveWheelConfiguration(DriveWheelConfigurationValue.Builder driveWheelConfigurationValue); + @NotNull Builder driveWheelConfiguration(String driveWheelConfiguration); + @NotNull Builder fuelType(QualitativeValue qualitativeValue); + @NotNull Builder fuelType(QualitativeValue.Builder qualitativeValue); + @NotNull Builder fuelType(String fuelType); + @NotNull Builder vehicleInteriorColor(String vehicleInteriorColor); + @NotNull Builder vehicleInteriorType(String vehicleInteriorType); + @NotNull Builder mileageFromOdometer(QuantitativeValue quantitativeValue); + @NotNull Builder mileageFromOdometer(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vehicleModelDate(java.util.Date date); + @NotNull Builder numberOfPreviousOwners(Number number); + @NotNull Builder numberOfPreviousOwners(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfPreviousOwners(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder productionDate(java.util.Date date); + @NotNull Builder purchaseDate(java.util.Date date); + @NotNull Builder vehicleSeatingCapacity(Number number); + @NotNull Builder vehicleSeatingCapacity(QuantitativeValue quantitativeValue); + @NotNull Builder vehicleSeatingCapacity(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder vehicleTransmission(QualitativeValue qualitativeValue); + @NotNull Builder vehicleTransmission(QualitativeValue.Builder qualitativeValue); + @NotNull Builder vehicleTransmission(String vehicleTransmission); + @NotNull Builder steeringPosition(SteeringPositionValue steeringPositionValue); + @NotNull Builder steeringPosition(SteeringPositionValue.Builder steeringPositionValue); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder award(String award); + @NotNull Builder brand(Brand brand); + @NotNull Builder brand(Brand.Builder brand); + @NotNull Builder brand(Organization organization); + @NotNull Builder brand(Organization.Builder organization); + @NotNull Builder category(PhysicalActivityCategory physicalActivityCategory); + @NotNull Builder category(PhysicalActivityCategory.Builder physicalActivityCategory); + @NotNull Builder category(String category); + @NotNull Builder category(Thing thing); + @NotNull Builder category(Thing.Builder thing); + @NotNull Builder color(String color); + @NotNull Builder depth(Distance distance); + @NotNull Builder depth(Distance.Builder distance); + @NotNull Builder depth(QuantitativeValue quantitativeValue); + @NotNull Builder depth(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder gtin12(String gtin12); + @NotNull Builder gtin13(String gtin13); + @NotNull Builder gtin14(String gtin14); + @NotNull Builder gtin8(String gtin8); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder isAccessoryOrSparePartFor(Product product); + @NotNull Builder isAccessoryOrSparePartFor(Product.Builder product); + @NotNull Builder isConsumableFor(Product product); + @NotNull Builder isConsumableFor(Product.Builder product); + @NotNull Builder isRelatedTo(Product product); + @NotNull Builder isRelatedTo(Product.Builder product); + @NotNull Builder isSimilarTo(Product product); + @NotNull Builder isSimilarTo(Product.Builder product); + @NotNull Builder itemCondition(OfferItemCondition offerItemCondition); + @NotNull Builder itemCondition(OfferItemCondition.Builder offerItemCondition); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder manufacturer(Organization organization); + @NotNull Builder manufacturer(Organization.Builder organization); + @NotNull Builder model(ProductModel productModel); + @NotNull Builder model(ProductModel.Builder productModel); + @NotNull Builder model(String model); + @NotNull Builder mpn(String mpn); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder productID(String productID); + @NotNull Builder releaseDate(java.util.Date date); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sku(String sku); + @NotNull Builder weight(QuantitativeValue quantitativeValue); + @NotNull Builder weight(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(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) { diff --git a/src/main/java/org/schema/VehicleSpecialUsage.java b/src/main/java/org/schema/VehicleSpecialUsage.java index 9bc83cab..0b285b1d 100644 --- a/src/main/java/org/schema/VehicleSpecialUsage.java +++ b/src/main/java/org/schema/VehicleSpecialUsage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Indicates whether the vehicle has been used for special purposes, like commercial rental, driving school, or as a taxi. The legislation in many countries requires this information to be revealed when offering a car for sale. */ @@ -25,7 +29,7 @@ public class VehicleSpecialUsage { /** * Builder for {@link VehicleSpecialUsage} */ - public static final class VehicleSpecialUsageThingBuilder implements Builder { + static final class VehicleSpecialUsageThingBuilder implements Builder { /** * Creates new {@link VehicleSpecialUsage} instance. */ @@ -34,7 +38,7 @@ public VehicleSpecialUsage build() { } } public interface Builder extends ThingBuilder { - + } protected VehicleSpecialUsage() { diff --git a/src/main/java/org/schema/Vein.java b/src/main/java/org/schema/Vein.java index 96ca7fd9..f9d39961 100644 --- a/src/main/java/org/schema/Vein.java +++ b/src/main/java/org/schema/Vein.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A type of blood vessel that specifically carries blood to the heart. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -44,7 +48,7 @@ public AnatomicalStructure getTributary() { /** * Builder for {@link Vein} */ - public static final class VeinThingBuilder implements Builder { + static final class VeinThingBuilder implements Builder { /** * Creates new {@link Vein} instance. */ @@ -54,20 +58,20 @@ public Vein build() { /** * The vasculature that the vein drains into. */ - public Builder drainsTo(Vessel vessel) { + @NotNull public Builder drainsTo(Vessel vessel) { this.drainsTo = vessel; return this; } /** * The vasculature that the vein drains into. */ - public Builder drainsTo(Vessel.Builder vessel) { + @NotNull public Builder drainsTo(Vessel.Builder vessel) { return this.drainsTo(vessel.build()); } /** * The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ. */ - public Builder regionDrained(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder regionDrained(AnatomicalStructure anatomicalStructure) { if (this.regionDrained == null) this.regionDrained = new AnatomicalStructureOrAnatomicalSystem(); this.regionDrained.setAnatomicalStructure(anatomicalStructure); return this; @@ -75,13 +79,13 @@ public Builder regionDrained(AnatomicalStructure anatomicalStructure) { /** * The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ. */ - public Builder regionDrained(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder regionDrained(AnatomicalStructure.Builder anatomicalStructure) { return this.regionDrained(anatomicalStructure.build()); } /** * The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ. */ - public Builder regionDrained(AnatomicalSystem anatomicalSystem) { + @NotNull public Builder regionDrained(AnatomicalSystem anatomicalSystem) { if (this.regionDrained == null) this.regionDrained = new AnatomicalStructureOrAnatomicalSystem(); this.regionDrained.setAnatomicalSystem(anatomicalSystem); return this; @@ -89,211 +93,211 @@ public Builder regionDrained(AnatomicalSystem anatomicalSystem) { /** * The anatomical or organ system drained by this vessel; generally refers to a specific part of an organ. */ - public Builder regionDrained(AnatomicalSystem.Builder anatomicalSystem) { + @NotNull public Builder regionDrained(AnatomicalSystem.Builder anatomicalSystem) { return this.regionDrained(anatomicalSystem.build()); } /** * The anatomical or organ system that the vein flows into; a larger structure that the vein connects to. */ - public Builder tributary(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder tributary(AnatomicalStructure anatomicalStructure) { this.tributary = anatomicalStructure; return this; } /** * The anatomical or organ system that the vein flows into; a larger structure that the vein connects to. */ - public Builder tributary(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder tributary(AnatomicalStructure.Builder anatomicalStructure) { return this.tributary(anatomicalStructure.build()); } /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -327,7 +331,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -362,7 +366,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -395,7 +399,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -403,38 +407,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -470,52 +474,52 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder drainsTo(Vessel vessel); - Builder drainsTo(Vessel.Builder vessel); - Builder regionDrained(AnatomicalStructure anatomicalStructure); - Builder regionDrained(AnatomicalStructure.Builder anatomicalStructure); - Builder regionDrained(AnatomicalSystem anatomicalSystem); - Builder regionDrained(AnatomicalSystem.Builder anatomicalSystem); - Builder tributary(AnatomicalStructure anatomicalStructure); - Builder tributary(AnatomicalStructure.Builder anatomicalStructure); - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder drainsTo(Vessel vessel); + @NotNull Builder drainsTo(Vessel.Builder vessel); + @NotNull Builder regionDrained(AnatomicalStructure anatomicalStructure); + @NotNull Builder regionDrained(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder regionDrained(AnatomicalSystem anatomicalSystem); + @NotNull Builder regionDrained(AnatomicalSystem.Builder anatomicalSystem); + @NotNull Builder tributary(AnatomicalStructure anatomicalStructure); + @NotNull Builder tributary(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected Vein(Vessel drainsTo, AnatomicalStructureOrAnatomicalSystem regionDrained, AnatomicalStructure tributary, 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) { diff --git a/src/main/java/org/schema/VenueMap.java b/src/main/java/org/schema/VenueMap.java index e6db8804..f977bf94 100644 --- a/src/main/java/org/schema/VenueMap.java +++ b/src/main/java/org/schema/VenueMap.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A venue map (e.g. for malls, auditoriums, museums, etc.). */ @@ -25,7 +29,7 @@ public class VenueMap { /** * Builder for {@link VenueMap} */ - public static final class VenueMapThingBuilder implements Builder { + static final class VenueMapThingBuilder implements Builder { /** * Creates new {@link VenueMap} instance. */ @@ -34,7 +38,7 @@ public VenueMap build() { } } public interface Builder extends ThingBuilder { - + } protected VenueMap() { diff --git a/src/main/java/org/schema/Vessel.java b/src/main/java/org/schema/Vessel.java index 8ce63a3f..f5ff4aab 100644 --- a/src/main/java/org/schema/Vessel.java +++ b/src/main/java/org/schema/Vessel.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A component of the human body circulatory system comprised of an intricate network of hollow tubes that transport blood throughout the entire body. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_WikiDoc @@ -26,7 +30,7 @@ public class Vessel extends AnatomicalStructure { /** * Builder for {@link Vessel} */ - public static final class VesselThingBuilder implements Builder { + static final class VesselThingBuilder implements Builder { /** * Creates new {@link Vessel} instance. */ @@ -36,192 +40,192 @@ public Vessel build() { /** * If applicable, a description of the pathophysiology associated with the anatomical system, including potential abnormal changes in the mechanical, physical, and biochemical functions of the system. */ - public Builder associatedPathophysiology(String associatedPathophysiology) { + @NotNull public Builder associatedPathophysiology(String associatedPathophysiology) { this.associatedPathophysiology = associatedPathophysiology; return this; } /** * Location in the body of the anatomical structure. */ - public Builder bodyLocation(String bodyLocation) { + @NotNull public Builder bodyLocation(String bodyLocation) { this.bodyLocation = bodyLocation; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure anatomicalStructure) { this.connectedTo = anatomicalStructure; return this; } /** * Other anatomical structures to which this structure is connected. */ - public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure) { return this.connectedTo(anatomicalStructure.build()); } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject imageObject) { + @NotNull public Builder diagram(ImageObject imageObject) { this.diagram = imageObject; return this; } /** * An image containing a diagram that illustrates the structure and/or its component substructures and/or connections with other structures. */ - public Builder diagram(ImageObject.Builder imageObject) { + @NotNull public Builder diagram(ImageObject.Builder imageObject) { return this.diagram(imageObject.build()); } /** * Function of the anatomical structure. */ - public Builder function(String function) { + @NotNull public Builder function(String function) { this.function = function; return this; } /** * The anatomical or organ system that this structure is part of. */ - public Builder partOfSystem(IsPartOf isPartOf) { + @NotNull public Builder partOfSystem(IsPartOf isPartOf) { this.partOfSystem = isPartOf; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition medicalCondition) { this.relatedCondition = medicalCondition; return this; } /** * A medical condition associated with this anatomy. */ - public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { + @NotNull public Builder relatedCondition(MedicalCondition.Builder medicalCondition) { return this.relatedCondition(medicalCondition.build()); } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy medicalTherapy) { this.relatedTherapy = medicalTherapy; return this; } /** * A medical therapy related to this anatomy. */ - public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { + @NotNull public Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy) { return this.relatedTherapy(medicalTherapy.build()); } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure anatomicalStructure) { this.subStructure = anatomicalStructure; return this; } /** * Component (sub-)structure(s) that comprise this anatomical structure. */ - public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { + @NotNull public Builder subStructure(AnatomicalStructure.Builder anatomicalStructure) { return this.subStructure(anatomicalStructure.build()); } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode medicalCode) { + @NotNull public Builder code(MedicalCode medicalCode) { this.code = medicalCode; return this; } /** * A medical code for the entity, taken from a controlled vocabulary or ontology such as ICD-9, DiseasesDB, MeSH, SNOMED-CT, RxNorm, etc. */ - public Builder code(MedicalCode.Builder medicalCode) { + @NotNull public Builder code(MedicalCode.Builder medicalCode) { return this.code(medicalCode.build()); } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline medicalGuideline) { this.guideline = medicalGuideline; return this; } /** * A medical guideline related to this entity. */ - public Builder guideline(MedicalGuideline.Builder medicalGuideline) { + @NotNull public Builder guideline(MedicalGuideline.Builder medicalGuideline) { return this.guideline(medicalGuideline.build()); } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem medicineSystem) { this.medicineSystem = medicineSystem; return this; } /** * The system of medicine that includes this MedicalEntity, for example 'evidence-based', 'homeopathic', 'chiropractic', etc. */ - public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { + @NotNull public Builder medicineSystem(MedicineSystem.Builder medicineSystem) { return this.medicineSystem(medicineSystem.build()); } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization organization) { + @NotNull public Builder recognizingAuthority(Organization organization) { this.recognizingAuthority = organization; return this; } /** * If applicable, the organization that officially recognizes this entity as part of its endorsed system of medicine. */ - public Builder recognizingAuthority(Organization.Builder organization) { + @NotNull public Builder recognizingAuthority(Organization.Builder organization) { return this.recognizingAuthority(organization.build()); } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty medicalSpecialty) { this.relevantSpecialty = medicalSpecialty; return this; } /** * If applicable, a medical specialty in which this entity is relevant. */ - public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { + @NotNull public Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty) { return this.relevantSpecialty(medicalSpecialty.build()); } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy medicalStudy) { + @NotNull public Builder study(MedicalStudy medicalStudy) { this.study = medicalStudy; return this; } /** * A medical study or trial related to this entity. */ - public Builder study(MedicalStudy.Builder medicalStudy) { + @NotNull public Builder study(MedicalStudy.Builder medicalStudy) { return this.study(medicalStudy.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -255,7 +259,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -290,7 +294,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -323,7 +327,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -331,38 +335,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -395,44 +399,44 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder associatedPathophysiology(String associatedPathophysiology); - Builder bodyLocation(String bodyLocation); - Builder connectedTo(AnatomicalStructure anatomicalStructure); - Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); - Builder diagram(ImageObject imageObject); - Builder diagram(ImageObject.Builder imageObject); - Builder function(String function); - Builder partOfSystem(IsPartOf isPartOf); - Builder relatedCondition(MedicalCondition medicalCondition); - Builder relatedCondition(MedicalCondition.Builder medicalCondition); - Builder relatedTherapy(MedicalTherapy medicalTherapy); - Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); - Builder subStructure(AnatomicalStructure anatomicalStructure); - Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); - Builder code(MedicalCode medicalCode); - Builder code(MedicalCode.Builder medicalCode); - Builder guideline(MedicalGuideline medicalGuideline); - Builder guideline(MedicalGuideline.Builder medicalGuideline); - Builder medicineSystem(MedicineSystem medicineSystem); - Builder medicineSystem(MedicineSystem.Builder medicineSystem); - Builder recognizingAuthority(Organization organization); - Builder recognizingAuthority(Organization.Builder organization); - Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); - Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); - Builder study(MedicalStudy medicalStudy); - Builder study(MedicalStudy.Builder medicalStudy); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder associatedPathophysiology(String associatedPathophysiology); + @NotNull Builder bodyLocation(String bodyLocation); + @NotNull Builder connectedTo(AnatomicalStructure anatomicalStructure); + @NotNull Builder connectedTo(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder diagram(ImageObject imageObject); + @NotNull Builder diagram(ImageObject.Builder imageObject); + @NotNull Builder function(String function); + @NotNull Builder partOfSystem(IsPartOf isPartOf); + @NotNull Builder relatedCondition(MedicalCondition medicalCondition); + @NotNull Builder relatedCondition(MedicalCondition.Builder medicalCondition); + @NotNull Builder relatedTherapy(MedicalTherapy medicalTherapy); + @NotNull Builder relatedTherapy(MedicalTherapy.Builder medicalTherapy); + @NotNull Builder subStructure(AnatomicalStructure anatomicalStructure); + @NotNull Builder subStructure(AnatomicalStructure.Builder anatomicalStructure); + @NotNull Builder code(MedicalCode medicalCode); + @NotNull Builder code(MedicalCode.Builder medicalCode); + @NotNull Builder guideline(MedicalGuideline medicalGuideline); + @NotNull Builder guideline(MedicalGuideline.Builder medicalGuideline); + @NotNull Builder medicineSystem(MedicineSystem medicineSystem); + @NotNull Builder medicineSystem(MedicineSystem.Builder medicineSystem); + @NotNull Builder recognizingAuthority(Organization organization); + @NotNull Builder recognizingAuthority(Organization.Builder organization); + @NotNull Builder relevantSpecialty(MedicalSpecialty medicalSpecialty); + @NotNull Builder relevantSpecialty(MedicalSpecialty.Builder medicalSpecialty); + @NotNull Builder study(MedicalStudy medicalStudy); + @NotNull Builder study(MedicalStudy.Builder medicalStudy); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/VeterinaryCare.java b/src/main/java/org/schema/VeterinaryCare.java index d9dff8f0..5cb67e3d 100644 --- a/src/main/java/org/schema/VeterinaryCare.java +++ b/src/main/java/org/schema/VeterinaryCare.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A vet's office. */ @@ -25,7 +29,7 @@ public class VeterinaryCare extends MedicalOrganization { /** * Builder for {@link VeterinaryCare} */ - public static final class VeterinaryCareThingBuilder implements Builder { + static final class VeterinaryCareThingBuilder implements Builder { /** * Creates new {@link VeterinaryCare} instance. */ @@ -35,107 +39,107 @@ public VeterinaryCare build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/VideoGallery.java b/src/main/java/org/schema/VideoGallery.java index 305b4387..3a54052c 100644 --- a/src/main/java/org/schema/VideoGallery.java +++ b/src/main/java/org/schema/VideoGallery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web page type: Video gallery page. */ @@ -25,7 +29,7 @@ public class VideoGallery extends CollectionPage { /** * Builder for {@link VideoGallery} */ - public static final class VideoGalleryThingBuilder implements Builder { + static final class VideoGalleryThingBuilder implements Builder { /** * Creates new {@link VideoGallery} instance. */ @@ -35,7 +39,7 @@ public VideoGallery build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -43,13 +47,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -57,47 +61,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -105,13 +109,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -119,153 +123,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -273,13 +277,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -287,20 +291,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -308,13 +312,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -322,40 +326,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -377,13 +381,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -391,13 +395,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -405,21 +409,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -427,7 +431,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -435,7 +439,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -443,7 +447,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -451,7 +455,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -459,13 +463,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -473,101 +477,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -575,13 +579,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -589,35 +593,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -625,13 +629,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -639,53 +643,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -693,13 +697,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -707,127 +711,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -835,7 +839,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -843,7 +847,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -851,7 +855,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -859,20 +863,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -880,13 +884,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -894,66 +898,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -961,13 +965,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -975,40 +979,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1042,7 +1046,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1077,7 +1081,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1110,7 +1114,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1118,38 +1122,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1220,7 +1224,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1238,160 +1242,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/VideoGame.java b/src/main/java/org/schema/VideoGame.java index 8041b799..888ab6ea 100644 --- a/src/main/java/org/schema/VideoGame.java +++ b/src/main/java/org/schema/VideoGame.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A video game is an electronic game that involves human interaction with a user interface to generate visual feedback on a video device. */ @@ -73,7 +77,7 @@ public GameServer getGameServer() { /** * Builder for {@link VideoGame} */ - public static final class VideoGameThingBuilder implements Builder { + static final class VideoGameThingBuilder implements Builder { /** * Creates new {@link VideoGame} instance. */ @@ -83,20 +87,20 @@ public VideoGame build() { /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -104,13 +108,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -118,65 +122,65 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicates whether this game is multi-player, co-op or single-player. The game can be marked as multi-player, co-op and single-player at the same time. */ - public Builder playMode(GamePlayMode gamePlayMode) { + @NotNull public Builder playMode(GamePlayMode gamePlayMode) { this.playMode = gamePlayMode; return this; } /** * Indicates whether this game is multi-player, co-op or single-player. The game can be marked as multi-player, co-op and single-player at the same time. */ - public Builder playMode(GamePlayMode.Builder gamePlayMode) { + @NotNull public Builder playMode(GamePlayMode.Builder gamePlayMode) { return this.playMode(gamePlayMode.build()); } /** * Cheat codes to the game. */ - public Builder cheatCode(CreativeWork creativeWork) { + @NotNull public Builder cheatCode(CreativeWork creativeWork) { this.cheatCode = creativeWork; return this; } /** * Cheat codes to the game. */ - public Builder cheatCode(CreativeWork.Builder creativeWork) { + @NotNull public Builder cheatCode(CreativeWork.Builder creativeWork) { return this.cheatCode(creativeWork.build()); } /** * Links to tips, tactics, etc. */ - public Builder gameTip(CreativeWork creativeWork) { + @NotNull public Builder gameTip(CreativeWork creativeWork) { this.gameTip = creativeWork; return this; } /** * Links to tips, tactics, etc. */ - public Builder gameTip(CreativeWork.Builder creativeWork) { + @NotNull public Builder gameTip(CreativeWork.Builder creativeWork) { return this.gameTip(creativeWork.build()); } /** * The electronic systems used to play video games. */ - public Builder gamePlatform(String gamePlatform) { + @NotNull public Builder gamePlatform(String gamePlatform) { if (this.gamePlatform == null) this.gamePlatform = new StringOrThing(); this.gamePlatform.setString(gamePlatform); return this; @@ -184,7 +188,7 @@ public Builder gamePlatform(String gamePlatform) { /** * The electronic systems used to play video games. */ - public Builder gamePlatform(Thing thing) { + @NotNull public Builder gamePlatform(Thing thing) { if (this.gamePlatform == null) this.gamePlatform = new StringOrThing(); this.gamePlatform.setThing(thing); return this; @@ -192,78 +196,78 @@ public Builder gamePlatform(Thing thing) { /** * The electronic systems used to play video games. */ - public Builder gamePlatform(Thing.Builder thing) { + @NotNull public Builder gamePlatform(Thing.Builder thing) { return this.gamePlatform(thing.build()); } /** * The server on which it is possible to play the game. */ - public Builder gameServer(GameServer gameServer) { + @NotNull public Builder gameServer(GameServer gameServer) { this.gameServer = gameServer; return this; } /** * The server on which it is possible to play the game. */ - public Builder gameServer(GameServer.Builder gameServer) { + @NotNull public Builder gameServer(GameServer.Builder gameServer) { return this.gameServer(gameServer.build()); } /** * Indicate how many people can play this game (minimum, maximum, or range). */ - public Builder numberOfPlayers(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfPlayers(QuantitativeValue quantitativeValue) { this.numberOfPlayers = quantitativeValue; return this; } /** * Indicate how many people can play this game (minimum, maximum, or range). */ - public Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue) { return this.numberOfPlayers(quantitativeValue.build()); } /** * The task that a player-controlled character, or group of characters may complete in order to gain a reward. */ - public Builder quest(Thing thing) { + @NotNull public Builder quest(Thing thing) { this.quest = thing; return this; } /** * The task that a player-controlled character, or group of characters may complete in order to gain a reward. */ - public Builder quest(Thing.Builder thing) { + @NotNull public Builder quest(Thing.Builder thing) { return this.quest(thing.build()); } /** * An item is an object within the game world that can be collected by a player or, occasionally, a non-player character. */ - public Builder gameItem(Thing thing) { + @NotNull public Builder gameItem(Thing thing) { this.gameItem = thing; return this; } /** * An item is an object within the game world that can be collected by a player or, occasionally, a non-player character. */ - public Builder gameItem(Thing.Builder thing) { + @NotNull public Builder gameItem(Thing.Builder thing) { return this.gameItem(thing.build()); } /** * A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage). */ - public Builder characterAttribute(Thing thing) { + @NotNull public Builder characterAttribute(Thing thing) { this.characterAttribute = thing; return this; } /** * A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage). */ - public Builder characterAttribute(Thing.Builder thing) { + @NotNull public Builder characterAttribute(Thing.Builder thing) { return this.characterAttribute(thing.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(Place place) { + @NotNull public Builder gameLocation(Place place) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setPlace(place); return this; @@ -271,13 +275,13 @@ public Builder gameLocation(Place place) { /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(Place.Builder place) { + @NotNull public Builder gameLocation(Place.Builder place) { return this.gameLocation(place.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(PostalAddress postalAddress) { + @NotNull public Builder gameLocation(PostalAddress postalAddress) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setPostalAddress(postalAddress); return this; @@ -285,13 +289,13 @@ public Builder gameLocation(PostalAddress postalAddress) { /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(PostalAddress.Builder postalAddress) { + @NotNull public Builder gameLocation(PostalAddress.Builder postalAddress) { return this.gameLocation(postalAddress.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(String gameLocation) { + @NotNull public Builder gameLocation(String gameLocation) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setString(gameLocation); return this; @@ -299,127 +303,127 @@ public Builder gameLocation(String gameLocation) { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -427,13 +431,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -441,20 +445,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -462,13 +466,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -476,40 +480,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -517,13 +521,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -531,13 +535,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -545,13 +549,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -559,21 +563,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -581,7 +585,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -589,7 +593,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -597,7 +601,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -605,7 +609,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -613,13 +617,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -627,101 +631,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -729,13 +733,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -743,35 +747,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -779,13 +783,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -793,53 +797,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -847,13 +851,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -861,127 +865,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -989,7 +993,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -997,7 +1001,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -1005,7 +1009,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -1013,20 +1017,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -1034,13 +1038,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -1048,66 +1052,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1115,13 +1119,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1129,40 +1133,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1196,7 +1200,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1231,7 +1235,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1264,7 +1268,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1272,38 +1276,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1379,7 +1383,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1397,176 +1401,176 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder director(Person person); - Builder director(Person.Builder person); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder playMode(GamePlayMode gamePlayMode); - Builder playMode(GamePlayMode.Builder gamePlayMode); - Builder cheatCode(CreativeWork creativeWork); - Builder cheatCode(CreativeWork.Builder creativeWork); - Builder gameTip(CreativeWork creativeWork); - Builder gameTip(CreativeWork.Builder creativeWork); - Builder gamePlatform(String gamePlatform); - Builder gamePlatform(Thing thing); - Builder gamePlatform(Thing.Builder thing); - Builder gameServer(GameServer gameServer); - Builder gameServer(GameServer.Builder gameServer); - Builder numberOfPlayers(QuantitativeValue quantitativeValue); - Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue); - Builder quest(Thing thing); - Builder quest(Thing.Builder thing); - Builder gameItem(Thing thing); - Builder gameItem(Thing.Builder thing); - Builder characterAttribute(Thing thing); - Builder characterAttribute(Thing.Builder thing); - Builder gameLocation(Place place); - Builder gameLocation(Place.Builder place); - Builder gameLocation(PostalAddress postalAddress); - Builder gameLocation(PostalAddress.Builder postalAddress); - Builder gameLocation(String gameLocation); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder playMode(GamePlayMode gamePlayMode); + @NotNull Builder playMode(GamePlayMode.Builder gamePlayMode); + @NotNull Builder cheatCode(CreativeWork creativeWork); + @NotNull Builder cheatCode(CreativeWork.Builder creativeWork); + @NotNull Builder gameTip(CreativeWork creativeWork); + @NotNull Builder gameTip(CreativeWork.Builder creativeWork); + @NotNull Builder gamePlatform(String gamePlatform); + @NotNull Builder gamePlatform(Thing thing); + @NotNull Builder gamePlatform(Thing.Builder thing); + @NotNull Builder gameServer(GameServer gameServer); + @NotNull Builder gameServer(GameServer.Builder gameServer); + @NotNull Builder numberOfPlayers(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder quest(Thing thing); + @NotNull Builder quest(Thing.Builder thing); + @NotNull Builder gameItem(Thing thing); + @NotNull Builder gameItem(Thing.Builder thing); + @NotNull Builder characterAttribute(Thing thing); + @NotNull Builder characterAttribute(Thing.Builder thing); + @NotNull Builder gameLocation(Place place); + @NotNull Builder gameLocation(Place.Builder place); + @NotNull Builder gameLocation(PostalAddress postalAddress); + @NotNull Builder gameLocation(PostalAddress.Builder postalAddress); + @NotNull Builder gameLocation(String gameLocation); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected VideoGame(Person director, MusicGroupOrPerson musicBy, VideoObject trailer, GamePlayMode playMode, CreativeWork cheatCode, CreativeWork gameTip, StringOrThing gamePlatform, GameServer gameServer, QuantitativeValue numberOfPlayers, Thing quest, Thing gameItem, Thing characterAttribute, PlaceOrPostalAddressOrString gameLocation, 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) { + protected VideoGame(Person director, MusicGroupOrPerson musicBy, VideoObject trailer, GamePlayMode playMode, CreativeWork cheatCode, CreativeWork gameTip, StringOrThing gamePlatform, GameServer gameServer, QuantitativeValue numberOfPlayers, Thing quest, Thing gameItem, Thing characterAttribute, PlaceOrPostalAddressOrString gameLocation, 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, int 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(numberOfPlayers, quest, gameItem, characterAttribute, gameLocation, 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); myDirector = director; myMusicBy = musicBy; diff --git a/src/main/java/org/schema/VideoGameClip.java b/src/main/java/org/schema/VideoGameClip.java index 98c4c887..16adcfbb 100644 --- a/src/main/java/org/schema/VideoGameClip.java +++ b/src/main/java/org/schema/VideoGameClip.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A short segment/part of a video game. */ @@ -25,7 +29,7 @@ public class VideoGameClip extends Clip { /** * Builder for {@link VideoGameClip} */ - public static final class VideoGameClipThingBuilder implements Builder { + static final class VideoGameClipThingBuilder implements Builder { /** * Creates new {@link VideoGameClip} instance. */ @@ -35,40 +39,40 @@ public VideoGameClip build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * Position of the clip within an ordered group of clips. */ - public Builder clipNumber(Position position) { + @NotNull public Builder clipNumber(Position position) { this.clipNumber = position; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -76,13 +80,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -90,154 +94,154 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The episode to which this clip belongs. */ - public Builder partOfEpisode(IsPartOf isPartOf) { + @NotNull public Builder partOfEpisode(IsPartOf isPartOf) { this.partOfEpisode = isPartOf; return this; } /** * The season to which this episode belongs. */ - public Builder partOfSeason(IsPartOf isPartOf) { + @NotNull public Builder partOfSeason(IsPartOf isPartOf) { this.partOfSeason = isPartOf; return this; } /** * The series to which this episode or season belongs. */ - public Builder partOfSeries(IsPartOf isPartOf) { + @NotNull public Builder partOfSeries(IsPartOf isPartOf) { this.partOfSeries = isPartOf; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -245,13 +249,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -259,20 +263,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -280,13 +284,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -294,40 +298,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -335,13 +339,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -349,13 +353,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -363,13 +367,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -377,21 +381,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -399,7 +403,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -407,7 +411,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -415,7 +419,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -423,7 +427,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -431,13 +435,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -445,101 +449,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -547,13 +551,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -561,35 +565,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -597,13 +601,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -611,53 +615,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -665,13 +669,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -679,127 +683,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -807,7 +811,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -815,7 +819,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -823,7 +827,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -831,20 +835,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -852,13 +856,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -866,66 +870,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -933,13 +937,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -947,40 +951,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1014,7 +1018,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1049,7 +1053,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1082,7 +1086,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1090,38 +1094,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1191,7 +1195,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1209,156 +1213,156 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder clipNumber(Position position); - Builder director(Person person); - Builder director(Person.Builder person); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder partOfEpisode(IsPartOf isPartOf); - Builder partOfSeason(IsPartOf isPartOf); - Builder partOfSeries(IsPartOf isPartOf); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder clipNumber(Position position); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder partOfEpisode(IsPartOf isPartOf); + @NotNull Builder partOfSeason(IsPartOf isPartOf); + @NotNull Builder partOfSeries(IsPartOf isPartOf); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/VideoGameSeries.java b/src/main/java/org/schema/VideoGameSeries.java index e6d3b98d..c83cb3be 100644 --- a/src/main/java/org/schema/VideoGameSeries.java +++ b/src/main/java/org/schema/VideoGameSeries.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A video game series. */ @@ -49,13 +53,13 @@ public MusicGroupOrPerson getMusicBy() { /** * The number of episodes in this season or series. */ - public Integer getNumberOfEpisodes() { + public int getNumberOfEpisodes() { return myNumberOfEpisodes; } /** * The number of seasons in this series. */ - public Integer getNumberOfSeasons() { + public int getNumberOfSeasons() { return myNumberOfSeasons; } /** @@ -127,7 +131,7 @@ public PlaceOrPostalAddressOrString getGameLocation() { /** * Builder for {@link VideoGameSeries} */ - public static final class VideoGameSeriesThingBuilder implements Builder { + static final class VideoGameSeriesThingBuilder implements Builder { /** * Creates new {@link VideoGameSeries} instance. */ @@ -137,40 +141,40 @@ public VideoGameSeries build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * An episode of a tv, radio or game media within a series or season. */ - public Builder episode(HasPart hasPart) { + @NotNull public Builder episode(HasPart hasPart) { this.episode = hasPart; return this; } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -178,13 +182,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -192,138 +196,138 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * The number of episodes in this season or series. */ - public Builder numberOfEpisodes(Integer integer) { - this.numberOfEpisodes = integer; + @NotNull public Builder numberOfEpisodes(int numberOfEpisodes) { + this.numberOfEpisodes = numberOfEpisodes; return this; } /** * The number of seasons in this series. */ - public Builder numberOfSeasons(Integer integer) { - this.numberOfSeasons = integer; + @NotNull public Builder numberOfSeasons(int numberOfSeasons) { + this.numberOfSeasons = numberOfSeasons; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * A season that is part of the media series. */ - public Builder containsSeason(HasPart hasPart) { + @NotNull public Builder containsSeason(HasPart hasPart) { this.containsSeason = hasPart; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject videoObject) { + @NotNull public Builder trailer(VideoObject videoObject) { this.trailer = videoObject; return this; } /** * The trailer of a movie or tv/radio series, season, episode, etc. */ - public Builder trailer(VideoObject.Builder videoObject) { + @NotNull public Builder trailer(VideoObject.Builder videoObject) { return this.trailer(videoObject.build()); } /** * Indicate how many people can play this game (minimum, maximum, or range). */ - public Builder numberOfPlayers(QuantitativeValue quantitativeValue) { + @NotNull public Builder numberOfPlayers(QuantitativeValue quantitativeValue) { this.numberOfPlayers = quantitativeValue; return this; } /** * Indicate how many people can play this game (minimum, maximum, or range). */ - public Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue) { return this.numberOfPlayers(quantitativeValue.build()); } /** * The task that a player-controlled character, or group of characters may complete in order to gain a reward. */ - public Builder quest(Thing thing) { + @NotNull public Builder quest(Thing thing) { this.quest = thing; return this; } /** * The task that a player-controlled character, or group of characters may complete in order to gain a reward. */ - public Builder quest(Thing.Builder thing) { + @NotNull public Builder quest(Thing.Builder thing) { return this.quest(thing.build()); } /** * An item is an object within the game world that can be collected by a player or, occasionally, a non-player character. */ - public Builder gameItem(Thing thing) { + @NotNull public Builder gameItem(Thing thing) { this.gameItem = thing; return this; } /** * An item is an object within the game world that can be collected by a player or, occasionally, a non-player character. */ - public Builder gameItem(Thing.Builder thing) { + @NotNull public Builder gameItem(Thing.Builder thing) { return this.gameItem(thing.build()); } /** * A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage). */ - public Builder characterAttribute(Thing thing) { + @NotNull public Builder characterAttribute(Thing thing) { this.characterAttribute = thing; return this; } /** * A piece of data that represents a particular aspect of a fictional character (skill, power, character points, advantage, disadvantage). */ - public Builder characterAttribute(Thing.Builder thing) { + @NotNull public Builder characterAttribute(Thing.Builder thing) { return this.characterAttribute(thing.build()); } /** * Indicates whether this game is multi-player, co-op or single-player. The game can be marked as multi-player, co-op and single-player at the same time. */ - public Builder playMode(GamePlayMode gamePlayMode) { + @NotNull public Builder playMode(GamePlayMode gamePlayMode) { this.playMode = gamePlayMode; return this; } /** * Indicates whether this game is multi-player, co-op or single-player. The game can be marked as multi-player, co-op and single-player at the same time. */ - public Builder playMode(GamePlayMode.Builder gamePlayMode) { + @NotNull public Builder playMode(GamePlayMode.Builder gamePlayMode) { return this.playMode(gamePlayMode.build()); } /** * Cheat codes to the game. */ - public Builder cheatCode(CreativeWork creativeWork) { + @NotNull public Builder cheatCode(CreativeWork creativeWork) { this.cheatCode = creativeWork; return this; } /** * Cheat codes to the game. */ - public Builder cheatCode(CreativeWork.Builder creativeWork) { + @NotNull public Builder cheatCode(CreativeWork.Builder creativeWork) { return this.cheatCode(creativeWork.build()); } /** * The electronic systems used to play video games. */ - public Builder gamePlatform(String gamePlatform) { + @NotNull public Builder gamePlatform(String gamePlatform) { if (this.gamePlatform == null) this.gamePlatform = new StringOrThing(); this.gamePlatform.setString(gamePlatform); return this; @@ -331,7 +335,7 @@ public Builder gamePlatform(String gamePlatform) { /** * The electronic systems used to play video games. */ - public Builder gamePlatform(Thing thing) { + @NotNull public Builder gamePlatform(Thing thing) { if (this.gamePlatform == null) this.gamePlatform = new StringOrThing(); this.gamePlatform.setThing(thing); return this; @@ -339,13 +343,13 @@ public Builder gamePlatform(Thing thing) { /** * The electronic systems used to play video games. */ - public Builder gamePlatform(Thing.Builder thing) { + @NotNull public Builder gamePlatform(Thing.Builder thing) { return this.gamePlatform(thing.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(Place place) { + @NotNull public Builder gameLocation(Place place) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setPlace(place); return this; @@ -353,13 +357,13 @@ public Builder gameLocation(Place place) { /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(Place.Builder place) { + @NotNull public Builder gameLocation(Place.Builder place) { return this.gameLocation(place.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(PostalAddress postalAddress) { + @NotNull public Builder gameLocation(PostalAddress postalAddress) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setPostalAddress(postalAddress); return this; @@ -367,13 +371,13 @@ public Builder gameLocation(PostalAddress postalAddress) { /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(PostalAddress.Builder postalAddress) { + @NotNull public Builder gameLocation(PostalAddress.Builder postalAddress) { return this.gameLocation(postalAddress.build()); } /** * Real or fictional location of the game (or part of game). */ - public Builder gameLocation(String gameLocation) { + @NotNull public Builder gameLocation(String gameLocation) { if (this.gameLocation == null) this.gameLocation = new PlaceOrPostalAddressOrString(); this.gameLocation.setString(gameLocation); return this; @@ -381,141 +385,141 @@ public Builder gameLocation(String gameLocation) { /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -523,13 +527,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -537,20 +541,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -558,13 +562,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -572,40 +576,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -613,13 +617,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -627,13 +631,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -641,13 +645,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -655,21 +659,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -677,7 +681,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -685,7 +689,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -693,7 +697,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -701,7 +705,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -709,13 +713,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -723,101 +727,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -825,13 +829,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -839,35 +843,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -875,13 +879,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -889,53 +893,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -943,13 +947,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -957,127 +961,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -1085,7 +1089,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -1093,7 +1097,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -1101,7 +1105,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -1109,20 +1113,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -1130,13 +1134,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -1144,66 +1148,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1211,13 +1215,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1225,40 +1229,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1292,7 +1296,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1327,7 +1331,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1360,7 +1364,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1368,38 +1372,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1410,8 +1414,8 @@ public Builder id(long id) { private Person director; private HasPart episode; private MusicGroupOrPerson musicBy; - private Integer numberOfEpisodes; - private Integer numberOfSeasons; + private int numberOfEpisodes; + private int numberOfSeasons; private Organization productionCompany; private HasPart containsSeason; private VideoObject trailer; @@ -1481,7 +1485,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1499,182 +1503,182 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder director(Person person); - Builder director(Person.Builder person); - Builder episode(HasPart hasPart); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder numberOfEpisodes(Integer integer); - Builder numberOfSeasons(Integer integer); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder containsSeason(HasPart hasPart); - Builder trailer(VideoObject videoObject); - Builder trailer(VideoObject.Builder videoObject); - Builder numberOfPlayers(QuantitativeValue quantitativeValue); - Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue); - Builder quest(Thing thing); - Builder quest(Thing.Builder thing); - Builder gameItem(Thing thing); - Builder gameItem(Thing.Builder thing); - Builder characterAttribute(Thing thing); - Builder characterAttribute(Thing.Builder thing); - Builder playMode(GamePlayMode gamePlayMode); - Builder playMode(GamePlayMode.Builder gamePlayMode); - Builder cheatCode(CreativeWork creativeWork); - Builder cheatCode(CreativeWork.Builder creativeWork); - Builder gamePlatform(String gamePlatform); - Builder gamePlatform(Thing thing); - Builder gamePlatform(Thing.Builder thing); - Builder gameLocation(Place place); - Builder gameLocation(Place.Builder place); - Builder gameLocation(PostalAddress postalAddress); - Builder gameLocation(PostalAddress.Builder postalAddress); - Builder gameLocation(String gameLocation); - Builder endDate(java.util.Date date); - Builder startDate(java.util.Date date); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder episode(HasPart hasPart); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder numberOfEpisodes(int numberOfEpisodes); + @NotNull Builder numberOfSeasons(int numberOfSeasons); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder containsSeason(HasPart hasPart); + @NotNull Builder trailer(VideoObject videoObject); + @NotNull Builder trailer(VideoObject.Builder videoObject); + @NotNull Builder numberOfPlayers(QuantitativeValue quantitativeValue); + @NotNull Builder numberOfPlayers(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder quest(Thing thing); + @NotNull Builder quest(Thing.Builder thing); + @NotNull Builder gameItem(Thing thing); + @NotNull Builder gameItem(Thing.Builder thing); + @NotNull Builder characterAttribute(Thing thing); + @NotNull Builder characterAttribute(Thing.Builder thing); + @NotNull Builder playMode(GamePlayMode gamePlayMode); + @NotNull Builder playMode(GamePlayMode.Builder gamePlayMode); + @NotNull Builder cheatCode(CreativeWork creativeWork); + @NotNull Builder cheatCode(CreativeWork.Builder creativeWork); + @NotNull Builder gamePlatform(String gamePlatform); + @NotNull Builder gamePlatform(Thing thing); + @NotNull Builder gamePlatform(Thing.Builder thing); + @NotNull Builder gameLocation(Place place); + @NotNull Builder gameLocation(Place.Builder place); + @NotNull Builder gameLocation(PostalAddress postalAddress); + @NotNull Builder gameLocation(PostalAddress.Builder postalAddress); + @NotNull Builder gameLocation(String gameLocation); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected VideoGameSeries(Person actor, Person director, HasPart episode, MusicGroupOrPerson musicBy, Integer numberOfEpisodes, Integer numberOfSeasons, Organization productionCompany, HasPart containsSeason, VideoObject trailer, QuantitativeValue numberOfPlayers, Thing quest, Thing gameItem, Thing characterAttribute, GamePlayMode playMode, CreativeWork cheatCode, StringOrThing gamePlatform, PlaceOrPostalAddressOrString gameLocation, 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) { + protected VideoGameSeries(Person actor, Person director, HasPart episode, MusicGroupOrPerson musicBy, int numberOfEpisodes, int numberOfSeasons, Organization productionCompany, HasPart containsSeason, VideoObject trailer, QuantitativeValue numberOfPlayers, Thing quest, Thing gameItem, Thing characterAttribute, GamePlayMode playMode, CreativeWork cheatCode, StringOrThing gamePlatform, PlaceOrPostalAddressOrString gameLocation, 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, int 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); myActor = actor; myDirector = director; @@ -1698,8 +1702,8 @@ protected VideoGameSeries(Person actor, Person director, HasPart episode, MusicG private Person myDirector; private HasPart myEpisode; private MusicGroupOrPerson myMusicBy; - private Integer myNumberOfEpisodes; - private Integer myNumberOfSeasons; + private int myNumberOfEpisodes; + private int myNumberOfSeasons; private Organization myProductionCompany; private HasPart myContainsSeason; private VideoObject myTrailer; diff --git a/src/main/java/org/schema/VideoObject.java b/src/main/java/org/schema/VideoObject.java index d62700e3..ebfe64ee 100644 --- a/src/main/java/org/schema/VideoObject.java +++ b/src/main/java/org/schema/VideoObject.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A video file. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_rNews @@ -74,7 +78,7 @@ public String getVideoQuality() { /** * Builder for {@link VideoObject} */ - public static final class VideoObjectThingBuilder implements Builder { + static final class VideoObjectThingBuilder implements Builder { /** * Creates new {@link VideoObject} instance. */ @@ -84,40 +88,40 @@ public VideoObject build() { /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person person) { + @NotNull public Builder actor(Person person) { this.actor = person; return this; } /** * An actor, e.g. in tv, radio, movie, video games etc. Actors can be associated with individual items or with a series, episode, clip. */ - public Builder actor(Person.Builder person) { + @NotNull public Builder actor(Person.Builder person) { return this.actor(person.build()); } /** * The caption for this object. */ - public Builder caption(String caption) { + @NotNull public Builder caption(String caption) { this.caption = caption; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person person) { + @NotNull public Builder director(Person person) { this.director = person; return this; } /** * A director of e.g. tv, radio, movie, video games etc. content. Directors can be associated with individual items or with a series, episode, clip. */ - public Builder director(Person.Builder person) { + @NotNull public Builder director(Person.Builder person) { return this.director(person.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup musicGroup) { + @NotNull public Builder musicBy(MusicGroup musicGroup) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setMusicGroup(musicGroup); return this; @@ -125,13 +129,13 @@ public Builder musicBy(MusicGroup musicGroup) { /** * The composer of the soundtrack. */ - public Builder musicBy(MusicGroup.Builder musicGroup) { + @NotNull public Builder musicBy(MusicGroup.Builder musicGroup) { return this.musicBy(musicGroup.build()); } /** * The composer of the soundtrack. */ - public Builder musicBy(Person person) { + @NotNull public Builder musicBy(Person person) { if (this.musicBy == null) this.musicBy = new MusicGroupOrPerson(); this.musicBy.setPerson(person); return this; @@ -139,128 +143,128 @@ public Builder musicBy(Person person) { /** * The composer of the soundtrack. */ - public Builder musicBy(Person.Builder person) { + @NotNull public Builder musicBy(Person.Builder person) { return this.musicBy(person.build()); } /** * Thumbnail image for an image or video. */ - public Builder thumbnail(ImageObject imageObject) { + @NotNull public Builder thumbnail(ImageObject imageObject) { this.thumbnail = imageObject; return this; } /** * Thumbnail image for an image or video. */ - public Builder thumbnail(ImageObject.Builder imageObject) { + @NotNull public Builder thumbnail(ImageObject.Builder imageObject) { return this.thumbnail(imageObject.build()); } /** * If this MediaObject is an AudioObject or VideoObject, the transcript of that object. */ - public Builder transcript(String transcript) { + @NotNull public Builder transcript(String transcript) { this.transcript = transcript; return this; } /** * The frame size of the video. */ - public Builder videoFrameSize(String videoFrameSize) { + @NotNull public Builder videoFrameSize(String videoFrameSize) { this.videoFrameSize = videoFrameSize; return this; } /** * The quality of the video. */ - public Builder videoQuality(String videoQuality) { + @NotNull public Builder videoQuality(String videoQuality) { this.videoQuality = videoQuality; return this; } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle newsArticle) { this.associatedArticle = newsArticle; return this; } /** * A NewsArticle associated with the Media Object. */ - public Builder associatedArticle(NewsArticle.Builder newsArticle) { + @NotNull public Builder associatedArticle(NewsArticle.Builder newsArticle) { return this.associatedArticle(newsArticle.build()); } /** * The bitrate of the media object. */ - public Builder bitrate(String bitrate) { + @NotNull public Builder bitrate(String bitrate) { this.bitrate = bitrate; return this; } /** * File size in (mega/kilo) bytes. */ - public Builder contentSize(String contentSize) { + @NotNull public Builder contentSize(String contentSize) { this.contentSize = contentSize; return this; } /** * Actual bytes of the media object, for example the image file or video file. */ - public Builder contentUrl(String contentUrl) { + @NotNull public Builder contentUrl(String contentUrl) { this.contentUrl = contentUrl; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * A URL pointing to a player for a specific video. In general, this is the information in the src element of an embed tag and should not be the same as the content of the loc tag. */ - public Builder embedUrl(String embedUrl) { + @NotNull public Builder embedUrl(String embedUrl) { this.embedUrl = embedUrl; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork creativeWork) { this.encodesCreativeWork = creativeWork; return this; } /** * The CreativeWork encoded by this media object. */ - public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder encodesCreativeWork(CreativeWork.Builder creativeWork) { return this.encodesCreativeWork(creativeWork.build()); } /** * mp3, mpeg4, etc. */ - public Builder encodingFormat(String encodingFormat) { + @NotNull public Builder encodingFormat(String encodingFormat) { this.encodingFormat = encodingFormat; return this; } /** * Date the content expires and is no longer useful or available. Useful for videos. */ - public Builder expires(java.util.Date date) { + @NotNull public Builder expires(java.util.Date date) { this.expires = date; return this; } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -268,13 +272,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -282,60 +286,60 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * Player type required—for example, Flash or Silverlight. */ - public Builder playerType(String playerType) { + @NotNull public Builder playerType(String playerType) { this.playerType = playerType; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization organization) { + @NotNull public Builder productionCompany(Organization organization) { this.productionCompany = organization; return this; } /** * The production company or studio responsible for the item e.g. series, video game, episode etc. */ - public Builder productionCompany(Organization.Builder organization) { + @NotNull public Builder productionCompany(Organization.Builder organization) { return this.productionCompany(organization.build()); } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place place) { + @NotNull public Builder regionsAllowed(Place place) { this.regionsAllowed = place; return this; } /** * The regions where the media is allowed. If not specified, then it's assumed to be allowed everywhere. Specify the countries in ISO 3166 format. */ - public Builder regionsAllowed(Place.Builder place) { + @NotNull public Builder regionsAllowed(Place.Builder place) { return this.regionsAllowed(place.build()); } /** * Indicates if use of the media require a subscription (either paid or free). Allowed values are true or false (note that an earlier version had 'yes', 'no'). */ - public Builder requiresSubscription(Boolean requiresSubscription) { + @NotNull public Builder requiresSubscription(Boolean requiresSubscription) { this.requiresSubscription = requiresSubscription; return this; } /** * Date when this media object was uploaded to this site. */ - public Builder uploadDate(java.util.Date date) { + @NotNull public Builder uploadDate(java.util.Date date) { this.uploadDate = date; return this; } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -343,13 +347,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -357,133 +361,133 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -491,13 +495,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -505,20 +509,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -526,13 +530,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -540,40 +544,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -581,13 +585,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -595,13 +599,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -609,13 +613,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -623,21 +627,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -645,7 +649,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -653,7 +657,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -661,7 +665,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -669,7 +673,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -677,13 +681,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -691,101 +695,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -793,13 +797,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -807,35 +811,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -843,13 +847,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -857,53 +861,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -911,13 +915,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -925,127 +929,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -1053,7 +1057,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -1061,7 +1065,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -1069,7 +1073,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -1077,20 +1081,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -1098,13 +1102,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -1112,66 +1116,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1179,13 +1183,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1193,40 +1197,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1260,7 +1264,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1295,7 +1299,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1328,7 +1332,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1336,38 +1340,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1454,7 +1458,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1472,185 +1476,185 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder actor(Person person); - Builder actor(Person.Builder person); - Builder caption(String caption); - Builder director(Person person); - Builder director(Person.Builder person); - Builder musicBy(MusicGroup musicGroup); - Builder musicBy(MusicGroup.Builder musicGroup); - Builder musicBy(Person person); - Builder musicBy(Person.Builder person); - Builder thumbnail(ImageObject imageObject); - Builder thumbnail(ImageObject.Builder imageObject); - Builder transcript(String transcript); - Builder videoFrameSize(String videoFrameSize); - Builder videoQuality(String videoQuality); - Builder associatedArticle(NewsArticle newsArticle); - Builder associatedArticle(NewsArticle.Builder newsArticle); - Builder bitrate(String bitrate); - Builder contentSize(String contentSize); - Builder contentUrl(String contentUrl); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder embedUrl(String embedUrl); - Builder encodesCreativeWork(CreativeWork creativeWork); - Builder encodesCreativeWork(CreativeWork.Builder creativeWork); - Builder encodingFormat(String encodingFormat); - Builder expires(java.util.Date date); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder playerType(String playerType); - Builder productionCompany(Organization organization); - Builder productionCompany(Organization.Builder organization); - Builder regionsAllowed(Place place); - Builder regionsAllowed(Place.Builder place); - Builder requiresSubscription(Boolean requiresSubscription); - Builder uploadDate(java.util.Date date); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder actor(Person person); + @NotNull Builder actor(Person.Builder person); + @NotNull Builder caption(String caption); + @NotNull Builder director(Person person); + @NotNull Builder director(Person.Builder person); + @NotNull Builder musicBy(MusicGroup musicGroup); + @NotNull Builder musicBy(MusicGroup.Builder musicGroup); + @NotNull Builder musicBy(Person person); + @NotNull Builder musicBy(Person.Builder person); + @NotNull Builder thumbnail(ImageObject imageObject); + @NotNull Builder thumbnail(ImageObject.Builder imageObject); + @NotNull Builder transcript(String transcript); + @NotNull Builder videoFrameSize(String videoFrameSize); + @NotNull Builder videoQuality(String videoQuality); + @NotNull Builder associatedArticle(NewsArticle newsArticle); + @NotNull Builder associatedArticle(NewsArticle.Builder newsArticle); + @NotNull Builder bitrate(String bitrate); + @NotNull Builder contentSize(String contentSize); + @NotNull Builder contentUrl(String contentUrl); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder embedUrl(String embedUrl); + @NotNull Builder encodesCreativeWork(CreativeWork creativeWork); + @NotNull Builder encodesCreativeWork(CreativeWork.Builder creativeWork); + @NotNull Builder encodingFormat(String encodingFormat); + @NotNull Builder expires(java.util.Date date); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder playerType(String playerType); + @NotNull Builder productionCompany(Organization organization); + @NotNull Builder productionCompany(Organization.Builder organization); + @NotNull Builder regionsAllowed(Place place); + @NotNull Builder regionsAllowed(Place.Builder place); + @NotNull Builder requiresSubscription(Boolean requiresSubscription); + @NotNull Builder uploadDate(java.util.Date date); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected VideoObject(Person actor, String caption, Person director, MusicGroupOrPerson musicBy, ImageObject thumbnail, String transcript, String videoFrameSize, String videoQuality, 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) { + protected VideoObject(Person actor, String caption, Person director, MusicGroupOrPerson musicBy, ImageObject thumbnail, String transcript, String videoFrameSize, String videoQuality, 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, int 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); myActor = actor; myCaption = caption; diff --git a/src/main/java/org/schema/ViewAction.java b/src/main/java/org/schema/ViewAction.java index b7f4847d..1c2d772a 100644 --- a/src/main/java/org/schema/ViewAction.java +++ b/src/main/java/org/schema/ViewAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of consuming static visual content. */ @@ -25,7 +29,7 @@ public class ViewAction extends ConsumeAction { /** * Builder for {@link ViewAction} */ - public static final class ViewActionThingBuilder implements Builder { + static final class ViewActionThingBuilder implements Builder { /** * Creates new {@link ViewAction} instance. */ @@ -35,20 +39,20 @@ public ViewAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/VinylFormat.java b/src/main/java/org/schema/VinylFormat.java index efc989e6..a5702663 100644 --- a/src/main/java/org/schema/VinylFormat.java +++ b/src/main/java/org/schema/VinylFormat.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * VinylFormat. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#MBZ @@ -26,7 +30,7 @@ public class VinylFormat { /** * Builder for {@link VinylFormat} */ - public static final class VinylFormatThingBuilder implements Builder { + static final class VinylFormatThingBuilder implements Builder { /** * Creates new {@link VinylFormat} instance. */ @@ -35,7 +39,7 @@ public VinylFormat build() { } } public interface Builder extends ThingBuilder { - + } protected VinylFormat() { diff --git a/src/main/java/org/schema/Virus.java b/src/main/java/org/schema/Virus.java index 72cf4ba1..7c907c87 100644 --- a/src/main/java/org/schema/Virus.java +++ b/src/main/java/org/schema/Virus.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Pathogenic virus that causes viral infection. */ @@ -25,7 +29,7 @@ public class Virus { /** * Builder for {@link Virus} */ - public static final class VirusThingBuilder implements Builder { + static final class VirusThingBuilder implements Builder { /** * Creates new {@link Virus} instance. */ @@ -34,7 +38,7 @@ public Virus build() { } } public interface Builder extends ThingBuilder { - + } protected Virus() { diff --git a/src/main/java/org/schema/VisualArtsEvent.java b/src/main/java/org/schema/VisualArtsEvent.java index b2cd2b3a..a6ab5900 100644 --- a/src/main/java/org/schema/VisualArtsEvent.java +++ b/src/main/java/org/schema/VisualArtsEvent.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Event type: Visual arts event. */ @@ -25,7 +29,7 @@ public class VisualArtsEvent extends Event { /** * Builder for {@link VisualArtsEvent} */ - public static final class VisualArtsEventThingBuilder implements Builder { + static final class VisualArtsEventThingBuilder implements Builder { /** * Creates new {@link VisualArtsEvent} instance. */ @@ -35,20 +39,20 @@ public VisualArtsEvent build() { /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * An organizer of an Event. */ - public Builder organizer(Organization organization) { + @NotNull public Builder organizer(Organization organization) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder organizer(Organization organization) { /** * An organizer of an Event. */ - public Builder organizer(Organization.Builder organization) { + @NotNull public Builder organizer(Organization.Builder organization) { return this.organizer(organization.build()); } /** * An organizer of an Event. */ - public Builder organizer(Person person) { + @NotNull public Builder organizer(Person person) { if (this.organizer == null) this.organizer = new OrganizationOrPerson(); this.organizer.setPerson(person); return this; @@ -70,13 +74,13 @@ public Builder organizer(Person person) { /** * An organizer of an Event. */ - public Builder organizer(Person.Builder person) { + @NotNull public Builder organizer(Person.Builder person) { return this.organizer(person.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Organization organization) { + @NotNull public Builder attendee(Organization organization) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder attendee(Organization organization) { /** * A person or organization attending the event. */ - public Builder attendee(Organization.Builder organization) { + @NotNull public Builder attendee(Organization.Builder organization) { return this.attendee(organization.build()); } /** * A person or organization attending the event. */ - public Builder attendee(Person person) { + @NotNull public Builder attendee(Person person) { if (this.attendee == null) this.attendee = new OrganizationOrPerson(); this.attendee.setPerson(person); return this; @@ -98,53 +102,53 @@ public Builder attendee(Person person) { /** * A person or organization attending the event. */ - public Builder attendee(Person.Builder person) { + @NotNull public Builder attendee(Person.Builder person) { return this.attendee(person.build()); } /** * The time admission will commence. */ - public Builder doorTime(java.util.Date date) { + @NotNull public Builder doorTime(java.util.Date date) { this.doorTime = date; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration duration) { + @NotNull public Builder duration(Duration duration) { this.duration = duration; return this; } /** * The duration of the item (movie, audio recording, event, etc.) in ISO 8601 date format. */ - public Builder duration(Duration.Builder duration) { + @NotNull public Builder duration(Duration.Builder duration) { return this.duration(duration.build()); } /** * The end date and time of the item (in ISO 8601 date format). */ - public Builder endDate(java.util.Date date) { + @NotNull public Builder endDate(java.util.Date date) { this.endDate = date; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType eventStatusType) { this.eventStatus = eventStatusType; return this; } /** * An eventStatus of an event represents its status; particularly useful when an event is cancelled or rescheduled. */ - public Builder eventStatus(EventStatusType.Builder eventStatusType) { + @NotNull public Builder eventStatus(EventStatusType.Builder eventStatusType) { return this.eventStatus(eventStatusType.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -152,13 +156,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -166,20 +170,20 @@ public Builder inLanguage(String inLanguage) { /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization organization) { + @NotNull public Builder performer(Organization organization) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setOrganization(organization); return this; @@ -187,13 +191,13 @@ public Builder performer(Organization organization) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Organization.Builder organization) { + @NotNull public Builder performer(Organization.Builder organization) { return this.performer(organization.build()); } /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person person) { + @NotNull public Builder performer(Person person) { if (this.performer == null) this.performer = new OrganizationOrPerson(); this.performer.setPerson(person); return this; @@ -201,113 +205,113 @@ public Builder performer(Person person) { /** * A performer at the event—for example, a presenter, musician, musical group or actor. */ - public Builder performer(Person.Builder person) { + @NotNull public Builder performer(Person.Builder person) { return this.performer(person.build()); } /** * Used in conjunction with eventStatus for rescheduled or cancelled events. This property contains the previously scheduled start date. For rescheduled events, the startDate property should be used for the newly scheduled start date. In the (rare) case of an event that has been postponed and rescheduled multiple times, this field may be repeated. */ - public Builder previousStartDate(java.util.Date date) { + @NotNull public Builder previousStartDate(java.util.Date date) { this.previousStartDate = date; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork creativeWork) { + @NotNull public Builder recordedIn(CreativeWork creativeWork) { this.recordedIn = creativeWork; return this; } /** * The CreativeWork that captured all or part of this Event. */ - public Builder recordedIn(CreativeWork.Builder creativeWork) { + @NotNull public Builder recordedIn(CreativeWork.Builder creativeWork) { return this.recordedIn(creativeWork.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The start date and time of the item (in ISO 8601 date format). */ - public Builder startDate(java.util.Date date) { + @NotNull public Builder startDate(java.util.Date date) { this.startDate = date; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event event) { + @NotNull public Builder subEvent(Event event) { this.subEvent = event; return this; } /** * An Event that is part of this event. For example, a conference event includes many presentations, each of which is a subEvent of the conference. */ - public Builder subEvent(Event.Builder event) { + @NotNull public Builder subEvent(Event.Builder event) { return this.subEvent(event.build()); } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event event) { + @NotNull public Builder superEvent(Event event) { this.superEvent = event; return this; } /** * An event that this event is a part of. For example, a collection of individual music performances might each have a music festival as their superEvent. */ - public Builder superEvent(Event.Builder event) { + @NotNull public Builder superEvent(Event.Builder event) { return this.superEvent(event.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork creativeWork) { + @NotNull public Builder workPerformed(CreativeWork creativeWork) { this.workPerformed = creativeWork; return this; } /** * A work performed in some event, for example a play performed in a TheaterEvent. */ - public Builder workPerformed(CreativeWork.Builder creativeWork) { + @NotNull public Builder workPerformed(CreativeWork.Builder creativeWork) { return this.workPerformed(creativeWork.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -341,7 +345,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -409,7 +413,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -417,38 +421,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -484,56 +488,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder organizer(Organization organization); - Builder organizer(Organization.Builder organization); - Builder organizer(Person person); - Builder organizer(Person.Builder person); - Builder attendee(Organization organization); - Builder attendee(Organization.Builder organization); - Builder attendee(Person person); - Builder attendee(Person.Builder person); - Builder doorTime(java.util.Date date); - Builder duration(Duration duration); - Builder duration(Duration.Builder duration); - Builder endDate(java.util.Date date); - Builder eventStatus(EventStatusType eventStatusType); - Builder eventStatus(EventStatusType.Builder eventStatusType); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder performer(Organization organization); - Builder performer(Organization.Builder organization); - Builder performer(Person person); - Builder performer(Person.Builder person); - Builder previousStartDate(java.util.Date date); - Builder recordedIn(CreativeWork creativeWork); - Builder recordedIn(CreativeWork.Builder creativeWork); - Builder review(Review review); - Builder review(Review.Builder review); - Builder startDate(java.util.Date date); - Builder subEvent(Event event); - Builder subEvent(Event.Builder event); - Builder superEvent(Event event); - Builder superEvent(Event.Builder event); - Builder typicalAgeRange(String typicalAgeRange); - Builder workPerformed(CreativeWork creativeWork); - Builder workPerformed(CreativeWork.Builder creativeWork); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder organizer(Organization organization); + @NotNull Builder organizer(Organization.Builder organization); + @NotNull Builder organizer(Person person); + @NotNull Builder organizer(Person.Builder person); + @NotNull Builder attendee(Organization organization); + @NotNull Builder attendee(Organization.Builder organization); + @NotNull Builder attendee(Person person); + @NotNull Builder attendee(Person.Builder person); + @NotNull Builder doorTime(java.util.Date date); + @NotNull Builder duration(Duration duration); + @NotNull Builder duration(Duration.Builder duration); + @NotNull Builder endDate(java.util.Date date); + @NotNull Builder eventStatus(EventStatusType eventStatusType); + @NotNull Builder eventStatus(EventStatusType.Builder eventStatusType); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder performer(Organization organization); + @NotNull Builder performer(Organization.Builder organization); + @NotNull Builder performer(Person person); + @NotNull Builder performer(Person.Builder person); + @NotNull Builder previousStartDate(java.util.Date date); + @NotNull Builder recordedIn(CreativeWork creativeWork); + @NotNull Builder recordedIn(CreativeWork.Builder creativeWork); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder startDate(java.util.Date date); + @NotNull Builder subEvent(Event event); + @NotNull Builder subEvent(Event.Builder event); + @NotNull Builder superEvent(Event event); + @NotNull Builder superEvent(Event.Builder event); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder workPerformed(CreativeWork creativeWork); + @NotNull Builder workPerformed(CreativeWork.Builder creativeWork); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/VisualArtwork.java b/src/main/java/org/schema/VisualArtwork.java index 5c79cbc5..e467ae0d 100644 --- a/src/main/java/org/schema/VisualArtwork.java +++ b/src/main/java/org/schema/VisualArtwork.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A work of art that is primarily visual in character. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_VisualArtworkClass @@ -62,13 +66,13 @@ public DistanceOrQuantitativeValue getDepth() { /** * The number of copies when multiple copies of a piece of artwork are produced - e.g. for a limited edition of 20 prints, 'artEdition' refers to the total number of copies (in this example "20"). */ - public IntegerOrString getArtEdition() { + public StringOrInt getArtEdition() { return myArtEdition; } /** * Builder for {@link VisualArtwork} */ - public static final class VisualArtworkThingBuilder implements Builder { + static final class VisualArtworkThingBuilder implements Builder { /** * Creates new {@link VisualArtwork} instance. */ @@ -78,28 +82,28 @@ public VisualArtwork build() { /** * e.g. Painting, Drawing, Sculpture, Print, Photograph, Assemblage, Collage, etc. */ - public Builder artform(String artform) { + @NotNull public Builder artform(String artform) { this.artform = artform; return this; } /** * The material used. (e.g. Oil, Watercolour, Acrylic, Linoprint, Marble, Cyanotype, Digital, Lithograph, DryPoint, Intaglio, Pastel, Woodcut, Pencil, Mixed Media, etc.) */ - public Builder artMedium(String artMedium) { + @NotNull public Builder artMedium(String artMedium) { this.artMedium = artMedium; return this; } /** * The supporting materials for the artwork, e.g. Canvas, Paper, Wood, Board, etc. */ - public Builder artworkSurface(String artworkSurface) { + @NotNull public Builder artworkSurface(String artworkSurface) { this.artworkSurface = artworkSurface; return this; } /** * The width of the item. */ - public Builder width(Distance distance) { + @NotNull public Builder width(Distance distance) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setDistance(distance); return this; @@ -107,13 +111,13 @@ public Builder width(Distance distance) { /** * The width of the item. */ - public Builder width(Distance.Builder distance) { + @NotNull public Builder width(Distance.Builder distance) { return this.width(distance.build()); } /** * The width of the item. */ - public Builder width(QuantitativeValue quantitativeValue) { + @NotNull public Builder width(QuantitativeValue quantitativeValue) { if (this.width == null) this.width = new DistanceOrQuantitativeValue(); this.width.setQuantitativeValue(quantitativeValue); return this; @@ -121,13 +125,13 @@ public Builder width(QuantitativeValue quantitativeValue) { /** * The width of the item. */ - public Builder width(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder width(QuantitativeValue.Builder quantitativeValue) { return this.width(quantitativeValue.build()); } /** * The height of the item. */ - public Builder height(Distance distance) { + @NotNull public Builder height(Distance distance) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setDistance(distance); return this; @@ -135,13 +139,13 @@ public Builder height(Distance distance) { /** * The height of the item. */ - public Builder height(Distance.Builder distance) { + @NotNull public Builder height(Distance.Builder distance) { return this.height(distance.build()); } /** * The height of the item. */ - public Builder height(QuantitativeValue quantitativeValue) { + @NotNull public Builder height(QuantitativeValue quantitativeValue) { if (this.height == null) this.height = new DistanceOrQuantitativeValue(); this.height.setQuantitativeValue(quantitativeValue); return this; @@ -149,13 +153,13 @@ public Builder height(QuantitativeValue quantitativeValue) { /** * The height of the item. */ - public Builder height(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder height(QuantitativeValue.Builder quantitativeValue) { return this.height(quantitativeValue.build()); } /** * The depth of the item. */ - public Builder depth(Distance distance) { + @NotNull public Builder depth(Distance distance) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setDistance(distance); return this; @@ -163,13 +167,13 @@ public Builder depth(Distance distance) { /** * The depth of the item. */ - public Builder depth(Distance.Builder distance) { + @NotNull public Builder depth(Distance.Builder distance) { return this.depth(distance.build()); } /** * The depth of the item. */ - public Builder depth(QuantitativeValue quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue quantitativeValue) { if (this.depth == null) this.depth = new DistanceOrQuantitativeValue(); this.depth.setQuantitativeValue(quantitativeValue); return this; @@ -177,149 +181,149 @@ public Builder depth(QuantitativeValue quantitativeValue) { /** * The depth of the item. */ - public Builder depth(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder depth(QuantitativeValue.Builder quantitativeValue) { return this.depth(quantitativeValue.build()); } /** * The number of copies when multiple copies of a piece of artwork are produced - e.g. for a limited edition of 20 prints, 'artEdition' refers to the total number of copies (in this example "20"). */ - public Builder artEdition(Integer integer) { - if (this.artEdition == null) this.artEdition = new IntegerOrString(); - this.artEdition.setInteger(integer); + @NotNull public Builder artEdition(String artEdition) { + if (this.artEdition == null) this.artEdition = new StringOrInt(); + this.artEdition.setString(artEdition); return this; } /** * The number of copies when multiple copies of a piece of artwork are produced - e.g. for a limited edition of 20 prints, 'artEdition' refers to the total number of copies (in this example "20"). */ - public Builder artEdition(String artEdition) { - if (this.artEdition == null) this.artEdition = new IntegerOrString(); - this.artEdition.setString(artEdition); + @NotNull public Builder artEdition(int artEdition) { + if (this.artEdition == null) this.artEdition = new StringOrInt(); + this.artEdition.setInt(artEdition); return this; } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -327,13 +331,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -341,20 +345,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -362,13 +366,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -376,40 +380,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -417,13 +421,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -431,13 +435,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -445,13 +449,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -459,21 +463,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -481,7 +485,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -489,7 +493,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -497,7 +501,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -505,7 +509,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -513,13 +517,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -527,101 +531,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -629,13 +633,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -643,35 +647,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -679,13 +683,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -693,53 +697,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -747,13 +751,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -761,127 +765,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -889,7 +893,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -897,7 +901,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -905,7 +909,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -913,20 +917,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -934,13 +938,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -948,66 +952,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1015,13 +1019,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1029,40 +1033,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1096,7 +1100,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1131,7 +1135,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1164,7 +1168,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1172,38 +1176,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1216,7 +1220,7 @@ public Builder id(long id) { private DistanceOrQuantitativeValue width; private DistanceOrQuantitativeValue height; private DistanceOrQuantitativeValue depth; - private IntegerOrString artEdition; + private StringOrInt artEdition; private String schemaVersion; private Thing about; private String accessibilityAPI; @@ -1273,7 +1277,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1291,161 +1295,161 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder artform(String artform); - Builder artMedium(String artMedium); - Builder artworkSurface(String artworkSurface); - Builder width(Distance distance); - Builder width(Distance.Builder distance); - Builder width(QuantitativeValue quantitativeValue); - Builder width(QuantitativeValue.Builder quantitativeValue); - Builder height(Distance distance); - Builder height(Distance.Builder distance); - Builder height(QuantitativeValue quantitativeValue); - Builder height(QuantitativeValue.Builder quantitativeValue); - Builder depth(Distance distance); - Builder depth(Distance.Builder distance); - Builder depth(QuantitativeValue quantitativeValue); - Builder depth(QuantitativeValue.Builder quantitativeValue); - Builder artEdition(Integer integer); - Builder artEdition(String artEdition); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder artform(String artform); + @NotNull Builder artMedium(String artMedium); + @NotNull Builder artworkSurface(String artworkSurface); + @NotNull Builder width(Distance distance); + @NotNull Builder width(Distance.Builder distance); + @NotNull Builder width(QuantitativeValue quantitativeValue); + @NotNull Builder width(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder height(Distance distance); + @NotNull Builder height(Distance.Builder distance); + @NotNull Builder height(QuantitativeValue quantitativeValue); + @NotNull Builder height(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder depth(Distance distance); + @NotNull Builder depth(Distance.Builder distance); + @NotNull Builder depth(QuantitativeValue quantitativeValue); + @NotNull Builder depth(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder artEdition(String artEdition); + @NotNull Builder artEdition(int artEdition); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected VisualArtwork(String artform, String artMedium, String artworkSurface, DistanceOrQuantitativeValue width, DistanceOrQuantitativeValue height, DistanceOrQuantitativeValue depth, IntegerOrString artEdition, 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) { + protected VisualArtwork(String artform, String artMedium, String artworkSurface, DistanceOrQuantitativeValue width, DistanceOrQuantitativeValue height, DistanceOrQuantitativeValue depth, StringOrInt artEdition, 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, int 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); myArtform = artform; myArtMedium = artMedium; @@ -1461,5 +1465,5 @@ protected VisualArtwork(String artform, String artMedium, String artworkSurface, private DistanceOrQuantitativeValue myWidth; private DistanceOrQuantitativeValue myHeight; private DistanceOrQuantitativeValue myDepth; - private IntegerOrString myArtEdition; + private StringOrInt myArtEdition; } diff --git a/src/main/java/org/schema/VitalSign.java b/src/main/java/org/schema/VitalSign.java index 53ae2e0b..ea1b95a2 100644 --- a/src/main/java/org/schema/VitalSign.java +++ b/src/main/java/org/schema/VitalSign.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * VitalSign. */ @@ -25,7 +29,7 @@ public class VitalSign { /** * Builder for {@link VitalSign} */ - public static final class VitalSignThingBuilder implements Builder { + static final class VitalSignThingBuilder implements Builder { /** * Creates new {@link VitalSign} instance. */ @@ -34,7 +38,7 @@ public VitalSign build() { } } public interface Builder extends ThingBuilder { - + } protected VitalSign() { diff --git a/src/main/java/org/schema/Volcano.java b/src/main/java/org/schema/Volcano.java index 53d6d0a4..d35466ed 100644 --- a/src/main/java/org/schema/Volcano.java +++ b/src/main/java/org/schema/Volcano.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A volcano, like Fuji san. */ @@ -25,7 +29,7 @@ public class Volcano extends Landform { /** * Builder for {@link Volcano} */ - public static final class VolcanoThingBuilder implements Builder { + static final class VolcanoThingBuilder implements Builder { /** * Creates new {@link Volcano} instance. */ @@ -35,66 +39,66 @@ public Volcano build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/VoteAction.java b/src/main/java/org/schema/VoteAction.java index 9933ae2b..305d07cd 100644 --- a/src/main/java/org/schema/VoteAction.java +++ b/src/main/java/org/schema/VoteAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of expressing a preference from a fixed/finite/structured set of choices/options. */ @@ -31,7 +35,7 @@ public Person getCandidate() { /** * Builder for {@link VoteAction} */ - public static final class VoteActionThingBuilder implements Builder { + static final class VoteActionThingBuilder implements Builder { /** * Creates new {@link VoteAction} instance. */ @@ -41,20 +45,20 @@ public VoteAction build() { /** * A sub property of object. The candidate subject of this action. */ - public Builder candidate(Person person) { + @NotNull public Builder candidate(Person person) { this.candidate = person; return this; } /** * A sub property of object. The candidate subject of this action. */ - public Builder candidate(Person.Builder person) { + @NotNull public Builder candidate(Person.Builder person) { return this.candidate(person.build()); } /** * A sub property of object. The options subject to this action. */ - public Builder actionOption(String actionOption) { + @NotNull public Builder actionOption(String actionOption) { if (this.actionOption == null) this.actionOption = new StringOrThing(); this.actionOption.setString(actionOption); return this; @@ -62,7 +66,7 @@ public Builder actionOption(String actionOption) { /** * A sub property of object. The options subject to this action. */ - public Builder actionOption(Thing thing) { + @NotNull public Builder actionOption(Thing thing) { if (this.actionOption == null) this.actionOption = new StringOrThing(); this.actionOption.setThing(thing); return this; @@ -70,13 +74,13 @@ public Builder actionOption(Thing thing) { /** * A sub property of object. The options subject to this action. */ - public Builder actionOption(Thing.Builder thing) { + @NotNull public Builder actionOption(Thing.Builder thing) { return this.actionOption(thing.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -84,13 +88,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -98,7 +102,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -106,7 +110,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -115,67 +119,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -209,7 +213,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -244,7 +248,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -277,7 +281,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -285,38 +289,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -342,35 +346,35 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder candidate(Person person); - Builder candidate(Person.Builder person); - Builder actionOption(String actionOption); - Builder actionOption(Thing thing); - Builder actionOption(Thing.Builder thing); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder candidate(Person person); + @NotNull Builder candidate(Person.Builder person); + @NotNull Builder actionOption(String actionOption); + @NotNull Builder actionOption(Thing thing); + @NotNull Builder actionOption(Thing.Builder thing); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected VoteAction(Person candidate, StringOrThing actionOption, 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) { diff --git a/src/main/java/org/schema/WPAdBlock.java b/src/main/java/org/schema/WPAdBlock.java index 2e004c5d..d76ec5a7 100644 --- a/src/main/java/org/schema/WPAdBlock.java +++ b/src/main/java/org/schema/WPAdBlock.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * An advertising section of the page. */ @@ -25,7 +29,7 @@ public class WPAdBlock extends WebPageElement { /** * Builder for {@link WPAdBlock} */ - public static final class WPAdBlockThingBuilder implements Builder { + static final class WPAdBlockThingBuilder implements Builder { /** * Creates new {@link WPAdBlock} instance. */ @@ -35,127 +39,127 @@ public WPAdBlock build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/WPFooter.java b/src/main/java/org/schema/WPFooter.java index 36161e39..e7ef5432 100644 --- a/src/main/java/org/schema/WPFooter.java +++ b/src/main/java/org/schema/WPFooter.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The footer section of the page. */ @@ -25,7 +29,7 @@ public class WPFooter extends WebPageElement { /** * Builder for {@link WPFooter} */ - public static final class WPFooterThingBuilder implements Builder { + static final class WPFooterThingBuilder implements Builder { /** * Creates new {@link WPFooter} instance. */ @@ -35,127 +39,127 @@ public WPFooter build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/WPHeader.java b/src/main/java/org/schema/WPHeader.java index c108e69a..d1c64a0a 100644 --- a/src/main/java/org/schema/WPHeader.java +++ b/src/main/java/org/schema/WPHeader.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The header section of the page. */ @@ -25,7 +29,7 @@ public class WPHeader extends WebPageElement { /** * Builder for {@link WPHeader} */ - public static final class WPHeaderThingBuilder implements Builder { + static final class WPHeaderThingBuilder implements Builder { /** * Creates new {@link WPHeader} instance. */ @@ -35,127 +39,127 @@ public WPHeader build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/WPSideBar.java b/src/main/java/org/schema/WPSideBar.java index 6f94c61b..425d7c4f 100644 --- a/src/main/java/org/schema/WPSideBar.java +++ b/src/main/java/org/schema/WPSideBar.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A sidebar section of the page. */ @@ -25,7 +29,7 @@ public class WPSideBar extends WebPageElement { /** * Builder for {@link WPSideBar} */ - public static final class WPSideBarThingBuilder implements Builder { + static final class WPSideBarThingBuilder implements Builder { /** * Creates new {@link WPSideBar} instance. */ @@ -35,127 +39,127 @@ public WPSideBar build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/WantAction.java b/src/main/java/org/schema/WantAction.java index cf8c0dd1..fc7bb456 100644 --- a/src/main/java/org/schema/WantAction.java +++ b/src/main/java/org/schema/WantAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of expressing a desire about the object. An agent wants an object. */ @@ -25,7 +29,7 @@ public class WantAction extends ReactAction { /** * Builder for {@link WantAction} */ - public static final class WantActionThingBuilder implements Builder { + static final class WantActionThingBuilder implements Builder { /** * Creates new {@link WantAction} instance. */ @@ -35,7 +39,7 @@ public WantAction build() { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -43,13 +47,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -57,7 +61,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -65,7 +69,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -74,67 +78,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -168,7 +172,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -203,7 +207,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -236,7 +240,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -244,38 +248,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -299,30 +303,30 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/WarrantyPromise.java b/src/main/java/org/schema/WarrantyPromise.java index a804beda..f93585bf 100644 --- a/src/main/java/org/schema/WarrantyPromise.java +++ b/src/main/java/org/schema/WarrantyPromise.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A structured value representing the duration and scope of services that will be provided to a customer free of charge in case of a defect or malfunction of a product. * Source: http://www.w3.org/wiki/WebSchemas/SchemaDotOrgSources#source_GoodRelationsClass @@ -38,7 +42,7 @@ public WarrantyScope getWarrantyScope() { /** * Builder for {@link WarrantyPromise} */ - public static final class WarrantyPromiseThingBuilder implements Builder { + static final class WarrantyPromiseThingBuilder implements Builder { /** * Creates new {@link WarrantyPromise} instance. */ @@ -48,47 +52,47 @@ public WarrantyPromise build() { /** * The duration of the warranty promise. Common unitCode values are ANN for year, MON for months, or DAY for days. */ - public Builder durationOfWarranty(QuantitativeValue quantitativeValue) { + @NotNull public Builder durationOfWarranty(QuantitativeValue quantitativeValue) { this.durationOfWarranty = quantitativeValue; return this; } /** * The duration of the warranty promise. Common unitCode values are ANN for year, MON for months, or DAY for days. */ - public Builder durationOfWarranty(QuantitativeValue.Builder quantitativeValue) { + @NotNull public Builder durationOfWarranty(QuantitativeValue.Builder quantitativeValue) { return this.durationOfWarranty(quantitativeValue.build()); } /** * The scope of the warranty promise. */ - public Builder warrantyScope(WarrantyScope warrantyScope) { + @NotNull public Builder warrantyScope(WarrantyScope warrantyScope) { this.warrantyScope = warrantyScope; return this; } /** * The scope of the warranty promise. */ - public Builder warrantyScope(WarrantyScope.Builder warrantyScope) { + @NotNull public Builder warrantyScope(WarrantyScope.Builder warrantyScope) { return this.warrantyScope(warrantyScope.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -122,7 +126,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -157,7 +161,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -190,7 +194,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -198,38 +202,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -249,22 +253,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder durationOfWarranty(QuantitativeValue quantitativeValue); - Builder durationOfWarranty(QuantitativeValue.Builder quantitativeValue); - Builder warrantyScope(WarrantyScope warrantyScope); - Builder warrantyScope(WarrantyScope.Builder warrantyScope); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder durationOfWarranty(QuantitativeValue quantitativeValue); + @NotNull Builder durationOfWarranty(QuantitativeValue.Builder quantitativeValue); + @NotNull Builder warrantyScope(WarrantyScope warrantyScope); + @NotNull Builder warrantyScope(WarrantyScope.Builder warrantyScope); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected WarrantyPromise(QuantitativeValue durationOfWarranty, WarrantyScope warrantyScope, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/WarrantyScope.java b/src/main/java/org/schema/WarrantyScope.java index 45c8e315..321acda3 100644 --- a/src/main/java/org/schema/WarrantyScope.java +++ b/src/main/java/org/schema/WarrantyScope.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A range of of services that will be provided to a customer free of charge in case of a defect or malfunction of a product. *
@@ -33,7 +37,7 @@ public class WarrantyScope extends Enumeration { /** * Builder for {@link WarrantyScope} */ - public static final class WarrantyScopeThingBuilder implements Builder { + static final class WarrantyScopeThingBuilder implements Builder { /** * Creates new {@link WarrantyScope} instance. */ @@ -43,7 +47,7 @@ public WarrantyScope build() { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration enumeration) { + @NotNull public Builder supersededBy(Enumeration enumeration) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setEnumeration(enumeration); return this; @@ -51,13 +55,13 @@ public Builder supersededBy(Enumeration enumeration) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Enumeration.Builder enumeration) { + @NotNull public Builder supersededBy(Enumeration.Builder enumeration) { return this.supersededBy(enumeration.build()); } /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property property) { + @NotNull public Builder supersededBy(Property property) { if (this.supersededBy == null) this.supersededBy = new EnumerationOrProperty(); this.supersededBy.setProperty(property); return this; @@ -65,27 +69,27 @@ public Builder supersededBy(Property property) { /** * Relates a term (i.e. a property, class or enumeration) to one that supersedes it. */ - public Builder supersededBy(Property.Builder property) { + @NotNull public Builder supersededBy(Property.Builder property) { return this.supersededBy(property.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -119,7 +123,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -154,7 +158,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -187,7 +191,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -195,38 +199,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -245,22 +249,22 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder supersededBy(Enumeration enumeration); - Builder supersededBy(Enumeration.Builder enumeration); - Builder supersededBy(Property property); - Builder supersededBy(Property.Builder property); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder supersededBy(Enumeration enumeration); + @NotNull Builder supersededBy(Enumeration.Builder enumeration); + @NotNull Builder supersededBy(Property property); + @NotNull Builder supersededBy(Property.Builder property); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected WarrantyScope(EnumerationOrProperty supersededBy, String additionalType, String alternateName, String description, CreativeWorkOrString mainEntityOfPage, String name, String sameAs, String url, Action potentialAction, String id) { diff --git a/src/main/java/org/schema/WatchAction.java b/src/main/java/org/schema/WatchAction.java index 7336a8fe..e873728c 100644 --- a/src/main/java/org/schema/WatchAction.java +++ b/src/main/java/org/schema/WatchAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of consuming dynamic/moving visual content. */ @@ -25,7 +29,7 @@ public class WatchAction extends ConsumeAction { /** * Builder for {@link WatchAction} */ - public static final class WatchActionThingBuilder implements Builder { + static final class WatchActionThingBuilder implements Builder { /** * Creates new {@link WatchAction} instance. */ @@ -35,20 +39,20 @@ public WatchAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Waterfall.java b/src/main/java/org/schema/Waterfall.java index 68443dcf..e0b403c4 100644 --- a/src/main/java/org/schema/Waterfall.java +++ b/src/main/java/org/schema/Waterfall.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A waterfall, like Niagara. */ @@ -25,7 +29,7 @@ public class Waterfall extends BodyOfWater { /** * Builder for {@link Waterfall} */ - public static final class WaterfallThingBuilder implements Builder { + static final class WaterfallThingBuilder implements Builder { /** * Creates new {@link Waterfall} instance. */ @@ -35,66 +39,66 @@ public Waterfall build() { /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -102,13 +106,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -116,27 +120,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -144,13 +148,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -158,7 +162,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -166,13 +170,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -180,20 +184,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -201,13 +205,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -215,26 +219,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -244,7 +248,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -254,27 +258,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -308,7 +312,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -343,7 +347,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -376,7 +380,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -384,38 +388,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -448,50 +452,50 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/WearAction.java b/src/main/java/org/schema/WearAction.java index ec2e14dd..aa120f56 100644 --- a/src/main/java/org/schema/WearAction.java +++ b/src/main/java/org/schema/WearAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of dressing oneself in clothing. */ @@ -25,7 +29,7 @@ public class WearAction extends UseAction { /** * Builder for {@link WearAction} */ - public static final class WearActionThingBuilder implements Builder { + static final class WearActionThingBuilder implements Builder { /** * Creates new {@link WearAction} instance. */ @@ -35,20 +39,20 @@ public WearAction build() { /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer offer) { + @NotNull public Builder expectsAcceptanceOf(Offer offer) { this.expectsAcceptanceOf = offer; return this; } /** * An Offer which must be accepted before the user can perform the Action. For example, the user may need to buy a movie before being able to watch it. */ - public Builder expectsAcceptanceOf(Offer.Builder offer) { + @NotNull public Builder expectsAcceptanceOf(Offer.Builder offer) { return this.expectsAcceptanceOf(offer.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -56,13 +60,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -70,7 +74,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -78,7 +82,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -87,67 +91,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -181,7 +185,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -216,7 +220,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -249,7 +253,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -257,38 +261,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -313,32 +317,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder expectsAcceptanceOf(Offer offer); - Builder expectsAcceptanceOf(Offer.Builder offer); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder expectsAcceptanceOf(Offer offer); + @NotNull Builder expectsAcceptanceOf(Offer.Builder offer); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/WebApplication.java b/src/main/java/org/schema/WebApplication.java index b0e4b292..ed0e83cc 100644 --- a/src/main/java/org/schema/WebApplication.java +++ b/src/main/java/org/schema/WebApplication.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Web applications. */ @@ -31,7 +35,7 @@ public String getBrowserRequirements() { /** * Builder for {@link WebApplication} */ - public static final class WebApplicationThingBuilder implements Builder { + static final class WebApplicationThingBuilder implements Builder { /** * Creates new {@link WebApplication} instance. */ @@ -41,133 +45,133 @@ public WebApplication build() { /** * Specifies browser requirements in human-readable text. For example,"requires HTML5 support". */ - public Builder browserRequirements(String browserRequirements) { + @NotNull public Builder browserRequirements(String browserRequirements) { this.browserRequirements = browserRequirements; return this; } /** * Type of software application, e.g. "Game, Multimedia". */ - public Builder applicationCategory(String applicationCategory) { + @NotNull public Builder applicationCategory(String applicationCategory) { this.applicationCategory = applicationCategory; return this; } /** * Subcategory of the application, e.g. "Arcade Game". */ - public Builder applicationSubCategory(String applicationSubCategory) { + @NotNull public Builder applicationSubCategory(String applicationSubCategory) { this.applicationSubCategory = applicationSubCategory; return this; } /** * The name of the application suite to which the application belongs (e.g. Excel belongs to Office). */ - public Builder applicationSuite(String applicationSuite) { + @NotNull public Builder applicationSuite(String applicationSuite) { this.applicationSuite = applicationSuite; return this; } /** * Countries for which the application is not supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder countriesNotSupported(String countriesNotSupported) { + @NotNull public Builder countriesNotSupported(String countriesNotSupported) { this.countriesNotSupported = countriesNotSupported; return this; } /** * Countries for which the application is supported. You can also provide the two-letter ISO 3166-1 alpha-2 country code. */ - public Builder countriesSupported(String countriesSupported) { + @NotNull public Builder countriesSupported(String countriesSupported) { this.countriesSupported = countriesSupported; return this; } /** * Device required to run the application. Used in cases where a specific make/model is required to run the application. */ - public Builder availableOnDevice(String availableOnDevice) { + @NotNull public Builder availableOnDevice(String availableOnDevice) { this.availableOnDevice = availableOnDevice; return this; } /** * If the file can be downloaded, URL to download the binary. */ - public Builder downloadUrl(String downloadUrl) { + @NotNull public Builder downloadUrl(String downloadUrl) { this.downloadUrl = downloadUrl; return this; } /** * Features or modules provided by this application (and possibly required by other applications). */ - public Builder featureList(String featureList) { + @NotNull public Builder featureList(String featureList) { this.featureList = featureList; return this; } /** * MIME format of the binary (e.g. application/zip). */ - public Builder fileFormat(String fileFormat) { + @NotNull public Builder fileFormat(String fileFormat) { this.fileFormat = fileFormat; return this; } /** * Size of the application / package (e.g. 18MB). In the absence of a unit (MB, KB etc.), KB will be assumed. */ - public Builder fileSize(Integer integer) { - this.fileSize = integer; + @NotNull public Builder fileSize(int fileSize) { + this.fileSize = fileSize; return this; } /** * URL at which the app may be installed, if different from the URL of the item. */ - public Builder installUrl(String installUrl) { + @NotNull public Builder installUrl(String installUrl) { this.installUrl = installUrl; return this; } /** * Minimum memory requirements. */ - public Builder memoryRequirements(String memoryRequirements) { + @NotNull public Builder memoryRequirements(String memoryRequirements) { this.memoryRequirements = memoryRequirements; return this; } /** * Operating systems supported (Windows 7, OSX 10.6, Android 1.6). */ - public Builder operatingSystem(String operatingSystem) { + @NotNull public Builder operatingSystem(String operatingSystem) { this.operatingSystem = operatingSystem; return this; } /** * Permission(s) required to run the app (for example, a mobile app may require full internet access or may run only on wifi). */ - public Builder permissions(String permissions) { + @NotNull public Builder permissions(String permissions) { this.permissions = permissions; return this; } /** * Processor architecture required to run the application (e.g. IA64). */ - public Builder processorRequirements(String processorRequirements) { + @NotNull public Builder processorRequirements(String processorRequirements) { this.processorRequirements = processorRequirements; return this; } /** * Description of what changed in this version. */ - public Builder releaseNotes(String releaseNotes) { + @NotNull public Builder releaseNotes(String releaseNotes) { this.releaseNotes = releaseNotes; return this; } /** * Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (Examples: DirectX, Java or .NET runtime). */ - public Builder softwareRequirements(String softwareRequirements) { + @NotNull public Builder softwareRequirements(String softwareRequirements) { this.softwareRequirements = softwareRequirements; return this; } /** * A link to a screenshot image of the app. */ - public Builder screenshot(ImageObject imageObject) { + @NotNull public Builder screenshot(ImageObject imageObject) { if (this.screenshot == null) this.screenshot = new ImageObjectOrString(); this.screenshot.setImageObject(imageObject); return this; @@ -175,13 +179,13 @@ public Builder screenshot(ImageObject imageObject) { /** * A link to a screenshot image of the app. */ - public Builder screenshot(ImageObject.Builder imageObject) { + @NotNull public Builder screenshot(ImageObject.Builder imageObject) { return this.screenshot(imageObject.build()); } /** * A link to a screenshot image of the app. */ - public Builder screenshot(String screenshot) { + @NotNull public Builder screenshot(String screenshot) { if (this.screenshot == null) this.screenshot = new ImageObjectOrString(); this.screenshot.setString(screenshot); return this; @@ -189,167 +193,167 @@ public Builder screenshot(String screenshot) { /** * Version of the software instance. */ - public Builder softwareVersion(String softwareVersion) { + @NotNull public Builder softwareVersion(String softwareVersion) { this.softwareVersion = softwareVersion; return this; } /** * Storage requirements (free space required). */ - public Builder storageRequirements(String storageRequirements) { + @NotNull public Builder storageRequirements(String storageRequirements) { this.storageRequirements = storageRequirements; return this; } /** * Additional content for a software application. */ - public Builder softwareAddOn(SoftwareApplication softwareApplication) { + @NotNull public Builder softwareAddOn(SoftwareApplication softwareApplication) { this.softwareAddOn = softwareApplication; return this; } /** * Additional content for a software application. */ - public Builder softwareAddOn(SoftwareApplication.Builder softwareApplication) { + @NotNull public Builder softwareAddOn(SoftwareApplication.Builder softwareApplication) { return this.softwareAddOn(softwareApplication.build()); } /** * Software application help. */ - public Builder softwareHelp(CreativeWork creativeWork) { + @NotNull public Builder softwareHelp(CreativeWork creativeWork) { this.softwareHelp = creativeWork; return this; } /** * Software application help. */ - public Builder softwareHelp(CreativeWork.Builder creativeWork) { + @NotNull public Builder softwareHelp(CreativeWork.Builder creativeWork) { return this.softwareHelp(creativeWork.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -357,13 +361,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -371,20 +375,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -392,13 +396,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -406,40 +410,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -447,13 +451,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -461,13 +465,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -475,13 +479,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -489,21 +493,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -511,7 +515,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -519,7 +523,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -527,7 +531,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -535,7 +539,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -543,13 +547,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -557,101 +561,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -659,13 +663,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -673,35 +677,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -709,13 +713,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -723,53 +727,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -777,13 +781,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -791,127 +795,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -919,7 +923,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -927,7 +931,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -935,7 +939,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -943,20 +947,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -964,13 +968,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -978,66 +982,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1045,13 +1049,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1059,40 +1063,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1126,7 +1130,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1161,7 +1165,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1194,7 +1198,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1202,38 +1206,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1250,7 +1254,7 @@ public Builder id(long id) { private String downloadUrl; private String featureList; private String fileFormat; - private Integer fileSize; + private int fileSize; private String installUrl; private String memoryRequirements; private String operatingSystem; @@ -1319,7 +1323,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1337,171 +1341,171 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder browserRequirements(String browserRequirements); - Builder applicationCategory(String applicationCategory); - Builder applicationSubCategory(String applicationSubCategory); - Builder applicationSuite(String applicationSuite); - Builder countriesNotSupported(String countriesNotSupported); - Builder countriesSupported(String countriesSupported); - Builder availableOnDevice(String availableOnDevice); - Builder downloadUrl(String downloadUrl); - Builder featureList(String featureList); - Builder fileFormat(String fileFormat); - Builder fileSize(Integer integer); - Builder installUrl(String installUrl); - Builder memoryRequirements(String memoryRequirements); - Builder operatingSystem(String operatingSystem); - Builder permissions(String permissions); - Builder processorRequirements(String processorRequirements); - Builder releaseNotes(String releaseNotes); - Builder softwareRequirements(String softwareRequirements); - Builder screenshot(ImageObject imageObject); - Builder screenshot(ImageObject.Builder imageObject); - Builder screenshot(String screenshot); - Builder softwareVersion(String softwareVersion); - Builder storageRequirements(String storageRequirements); - Builder softwareAddOn(SoftwareApplication softwareApplication); - Builder softwareAddOn(SoftwareApplication.Builder softwareApplication); - Builder softwareHelp(CreativeWork creativeWork); - Builder softwareHelp(CreativeWork.Builder creativeWork); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder browserRequirements(String browserRequirements); + @NotNull Builder applicationCategory(String applicationCategory); + @NotNull Builder applicationSubCategory(String applicationSubCategory); + @NotNull Builder applicationSuite(String applicationSuite); + @NotNull Builder countriesNotSupported(String countriesNotSupported); + @NotNull Builder countriesSupported(String countriesSupported); + @NotNull Builder availableOnDevice(String availableOnDevice); + @NotNull Builder downloadUrl(String downloadUrl); + @NotNull Builder featureList(String featureList); + @NotNull Builder fileFormat(String fileFormat); + @NotNull Builder fileSize(int fileSize); + @NotNull Builder installUrl(String installUrl); + @NotNull Builder memoryRequirements(String memoryRequirements); + @NotNull Builder operatingSystem(String operatingSystem); + @NotNull Builder permissions(String permissions); + @NotNull Builder processorRequirements(String processorRequirements); + @NotNull Builder releaseNotes(String releaseNotes); + @NotNull Builder softwareRequirements(String softwareRequirements); + @NotNull Builder screenshot(ImageObject imageObject); + @NotNull Builder screenshot(ImageObject.Builder imageObject); + @NotNull Builder screenshot(String screenshot); + @NotNull Builder softwareVersion(String softwareVersion); + @NotNull Builder storageRequirements(String storageRequirements); + @NotNull Builder softwareAddOn(SoftwareApplication softwareApplication); + @NotNull Builder softwareAddOn(SoftwareApplication.Builder softwareApplication); + @NotNull Builder softwareHelp(CreativeWork creativeWork); + @NotNull Builder softwareHelp(CreativeWork.Builder creativeWork); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected WebApplication(String browserRequirements, String applicationCategory, String applicationSubCategory, String applicationSuite, String countriesNotSupported, String countriesSupported, String availableOnDevice, String downloadUrl, String featureList, String fileFormat, Integer fileSize, String installUrl, String memoryRequirements, String operatingSystem, String permissions, String processorRequirements, String releaseNotes, String softwareRequirements, ImageObjectOrString screenshot, String softwareVersion, String storageRequirements, SoftwareApplication softwareAddOn, CreativeWork softwareHelp, 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) { + protected WebApplication(String browserRequirements, String applicationCategory, String applicationSubCategory, String applicationSuite, String countriesNotSupported, String countriesSupported, String availableOnDevice, String downloadUrl, String featureList, String fileFormat, int fileSize, String installUrl, String memoryRequirements, String operatingSystem, String permissions, String processorRequirements, String releaseNotes, String softwareRequirements, ImageObjectOrString screenshot, String softwareVersion, String storageRequirements, SoftwareApplication softwareAddOn, CreativeWork softwareHelp, 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, int 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(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; } diff --git a/src/main/java/org/schema/WebPage.java b/src/main/java/org/schema/WebPage.java index 41a9182e..3cd5b81f 100644 --- a/src/main/java/org/schema/WebPage.java +++ b/src/main/java/org/schema/WebPage.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A web page. Every web page is implicitly assumed to be declared to be of type WebPage, so the various properties about that webpage, such as breadcrumb may be used. We recommend explicit declaration if these properties are specified, but if they are found outside of an itemscope, they will be assumed to be about the page. */ @@ -31,7 +35,7 @@ public BreadcrumbListOrString getBreadcrumb() { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - @com.fasterxml.jackson.annotation.JsonFormat(shape = com.fasterxml.jackson.annotation.JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") + @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd'T'HH:mm:ss'Z'") public java.util.Date getLastReviewed() { return myLastReviewed; } @@ -74,7 +78,7 @@ public Specialty getSpecialty() { /** * Builder for {@link WebPage} */ - public static final class WebPageThingBuilder implements Builder { + static final class WebPageThingBuilder implements Builder { /** * Creates new {@link WebPage} instance. */ @@ -84,7 +88,7 @@ public WebPage build() { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList breadcrumbList) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setBreadcrumbList(breadcrumbList); return this; @@ -92,13 +96,13 @@ public Builder breadcrumb(BreadcrumbList breadcrumbList) { /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { + @NotNull public Builder breadcrumb(BreadcrumbList.Builder breadcrumbList) { return this.breadcrumb(breadcrumbList.build()); } /** * A set of links that can help a user understand and navigate a website hierarchy. */ - public Builder breadcrumb(String breadcrumb) { + @NotNull public Builder breadcrumb(String breadcrumb) { if (this.breadcrumb == null) this.breadcrumb = new BreadcrumbListOrString(); this.breadcrumb.setString(breadcrumb); return this; @@ -106,47 +110,47 @@ public Builder breadcrumb(String breadcrumb) { /** * Date on which the content on this web page was last reviewed for accuracy and/or completeness. */ - public Builder lastReviewed(java.util.Date date) { + @NotNull public Builder lastReviewed(java.util.Date date) { this.lastReviewed = date; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement webPageElement) { this.mainContentOfPage = webPageElement; return this; } /** * Indicates if this web page element is the main subject of the page. */ - public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { + @NotNull public Builder mainContentOfPage(WebPageElement.Builder webPageElement) { return this.mainContentOfPage(webPageElement.build()); } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject imageObject) { this.primaryImageOfPage = imageObject; return this; } /** * Indicates the main image on the page. */ - public Builder primaryImageOfPage(ImageObject.Builder imageObject) { + @NotNull public Builder primaryImageOfPage(ImageObject.Builder imageObject) { return this.primaryImageOfPage(imageObject.build()); } /** * A link related to this web page, for example to other related web pages. */ - public Builder relatedLink(String relatedLink) { + @NotNull public Builder relatedLink(String relatedLink) { this.relatedLink = relatedLink; return this; } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization organization) { + @NotNull public Builder reviewedBy(Organization organization) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setOrganization(organization); return this; @@ -154,13 +158,13 @@ public Builder reviewedBy(Organization organization) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Organization.Builder organization) { + @NotNull public Builder reviewedBy(Organization.Builder organization) { return this.reviewedBy(organization.build()); } /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person person) { + @NotNull public Builder reviewedBy(Person person) { if (this.reviewedBy == null) this.reviewedBy = new OrganizationOrPerson(); this.reviewedBy.setPerson(person); return this; @@ -168,153 +172,153 @@ public Builder reviewedBy(Person person) { /** * People or organizations that have reviewed the content on this web page for accuracy and/or completeness. */ - public Builder reviewedBy(Person.Builder person) { + @NotNull public Builder reviewedBy(Person.Builder person) { return this.reviewedBy(person.build()); } /** * One of the more significant URLs on the page. Typically, these are the non-navigation links that are clicked on the most. */ - public Builder significantLink(String significantLink) { + @NotNull public Builder significantLink(String significantLink) { this.significantLink = significantLink; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty specialty) { + @NotNull public Builder specialty(Specialty specialty) { this.specialty = specialty; return this; } /** * One of the domain specialities to which this web page's content applies. */ - public Builder specialty(Specialty.Builder specialty) { + @NotNull public Builder specialty(Specialty.Builder specialty) { return this.specialty(specialty.build()); } /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -322,13 +326,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -336,20 +340,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -357,13 +361,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -371,40 +375,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -412,13 +416,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -426,13 +430,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -440,13 +444,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -454,21 +458,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -476,7 +480,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -484,7 +488,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -492,7 +496,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -500,7 +504,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -508,13 +512,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -522,101 +526,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -624,13 +628,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -638,35 +642,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -674,13 +678,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -688,53 +692,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -742,13 +746,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -756,127 +760,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -884,7 +888,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -892,7 +896,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -900,7 +904,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -908,20 +912,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -929,13 +933,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -943,66 +947,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -1010,13 +1014,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -1024,40 +1028,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -1091,7 +1095,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -1126,7 +1130,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1159,7 +1163,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1167,38 +1171,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1269,7 +1273,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1287,160 +1291,160 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder breadcrumb(BreadcrumbList breadcrumbList); - Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); - Builder breadcrumb(String breadcrumb); - Builder lastReviewed(java.util.Date date); - Builder mainContentOfPage(WebPageElement webPageElement); - Builder mainContentOfPage(WebPageElement.Builder webPageElement); - Builder primaryImageOfPage(ImageObject imageObject); - Builder primaryImageOfPage(ImageObject.Builder imageObject); - Builder relatedLink(String relatedLink); - Builder reviewedBy(Organization organization); - Builder reviewedBy(Organization.Builder organization); - Builder reviewedBy(Person person); - Builder reviewedBy(Person.Builder person); - Builder significantLink(String significantLink); - Builder specialty(Specialty specialty); - Builder specialty(Specialty.Builder specialty); - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder breadcrumb(BreadcrumbList breadcrumbList); + @NotNull Builder breadcrumb(BreadcrumbList.Builder breadcrumbList); + @NotNull Builder breadcrumb(String breadcrumb); + @NotNull Builder lastReviewed(java.util.Date date); + @NotNull Builder mainContentOfPage(WebPageElement webPageElement); + @NotNull Builder mainContentOfPage(WebPageElement.Builder webPageElement); + @NotNull Builder primaryImageOfPage(ImageObject imageObject); + @NotNull Builder primaryImageOfPage(ImageObject.Builder imageObject); + @NotNull Builder relatedLink(String relatedLink); + @NotNull Builder reviewedBy(Organization organization); + @NotNull Builder reviewedBy(Organization.Builder organization); + @NotNull Builder reviewedBy(Person person); + @NotNull Builder reviewedBy(Person.Builder person); + @NotNull Builder significantLink(String significantLink); + @NotNull Builder specialty(Specialty specialty); + @NotNull Builder specialty(Specialty.Builder specialty); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - protected WebPage(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) { + protected WebPage(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, int 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); myBreadcrumb = breadcrumb; myLastReviewed = lastReviewed; diff --git a/src/main/java/org/schema/WebPageElement.java b/src/main/java/org/schema/WebPageElement.java index 44e75769..297df0a7 100644 --- a/src/main/java/org/schema/WebPageElement.java +++ b/src/main/java/org/schema/WebPageElement.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A web page element, like a table or an image. */ @@ -25,7 +29,7 @@ public class WebPageElement extends CreativeWork { /** * Builder for {@link WebPageElement} */ - public static final class WebPageElementThingBuilder implements Builder { + static final class WebPageElementThingBuilder implements Builder { /** * Creates new {@link WebPageElement} instance. */ @@ -35,127 +39,127 @@ public WebPageElement build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/WebSite.java b/src/main/java/org/schema/WebSite.java index 5e7dceff..f1608673 100644 --- a/src/main/java/org/schema/WebSite.java +++ b/src/main/java/org/schema/WebSite.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A WebSite is a set of related web pages and other items typically served from a single web domain and accessible via URLs. */ @@ -25,7 +29,7 @@ public class WebSite extends CreativeWork { /** * Builder for {@link WebSite} */ - public static final class WebSiteThingBuilder implements Builder { + static final class WebSiteThingBuilder implements Builder { /** * Creates new {@link WebSite} instance. */ @@ -35,127 +39,127 @@ public WebSite build() { /** * Indicates (by URL or string) a particular version of a schema used in some CreativeWork. For example, a document could declare a schemaVersion using an URL such as http://schema.org/version/2.0/ if precise indication of schema version was required by some application. */ - public Builder schemaVersion(String schemaVersion) { + @NotNull public Builder schemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; return this; } /** * The subject matter of the content. */ - public Builder about(Thing thing) { + @NotNull public Builder about(Thing thing) { this.about = thing; return this; } /** * The subject matter of the content. */ - public Builder about(Thing.Builder thing) { + @NotNull public Builder about(Thing.Builder thing) { return this.about(thing.build()); } /** * Indicates that the resource is compatible with the referenced accessibility API (WebSchemas wiki lists possible values). */ - public Builder accessibilityAPI(String accessibilityAPI) { + @NotNull public Builder accessibilityAPI(String accessibilityAPI) { this.accessibilityAPI = accessibilityAPI; return this; } /** * Identifies input methods that are sufficient to fully control the described resource (WebSchemas wiki lists possible values). */ - public Builder accessibilityControl(String accessibilityControl) { + @NotNull public Builder accessibilityControl(String accessibilityControl) { this.accessibilityControl = accessibilityControl; return this; } /** * Content features of the resource, such as accessible media, alternatives and supported enhancements for accessibility (WebSchemas wiki lists possible values). */ - public Builder accessibilityFeature(String accessibilityFeature) { + @NotNull public Builder accessibilityFeature(String accessibilityFeature) { this.accessibilityFeature = accessibilityFeature; return this; } /** * A characteristic of the described resource that is physiologically dangerous to some users. Related to WCAG 2.0 guideline 2.3 (WebSchemas wiki lists possible values). */ - public Builder accessibilityHazard(String accessibilityHazard) { + @NotNull public Builder accessibilityHazard(String accessibilityHazard) { this.accessibilityHazard = accessibilityHazard; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person person) { + @NotNull public Builder accountablePerson(Person person) { this.accountablePerson = person; return this; } /** * Specifies the Person that is legally accountable for the CreativeWork. */ - public Builder accountablePerson(Person.Builder person) { + @NotNull public Builder accountablePerson(Person.Builder person) { return this.accountablePerson(person.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * A secondary title of the CreativeWork. */ - public Builder alternativeHeadline(String alternativeHeadline) { + @NotNull public Builder alternativeHeadline(String alternativeHeadline) { this.alternativeHeadline = alternativeHeadline; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject mediaObject) { + @NotNull public Builder associatedMedia(MediaObject mediaObject) { this.associatedMedia = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for encoding. */ - public Builder associatedMedia(MediaObject.Builder mediaObject) { + @NotNull public Builder associatedMedia(MediaObject.Builder mediaObject) { return this.associatedMedia(mediaObject.build()); } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience audience) { + @NotNull public Builder audience(Audience audience) { this.audience = audience; return this; } /** * An intended audience, i.e. a group for whom something was created. */ - public Builder audience(Audience.Builder audience) { + @NotNull public Builder audience(Audience.Builder audience) { return this.audience(audience.build()); } /** * An embedded audio object. */ - public Builder audio(AudioObject audioObject) { + @NotNull public Builder audio(AudioObject audioObject) { this.audio = audioObject; return this; } /** * An embedded audio object. */ - public Builder audio(AudioObject.Builder audioObject) { + @NotNull public Builder audio(AudioObject.Builder audioObject) { return this.audio(audioObject.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization organization) { + @NotNull public Builder author(Organization organization) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setOrganization(organization); return this; @@ -163,13 +167,13 @@ public Builder author(Organization organization) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Organization.Builder organization) { + @NotNull public Builder author(Organization.Builder organization) { return this.author(organization.build()); } /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person person) { + @NotNull public Builder author(Person person) { if (this.author == null) this.author = new OrganizationOrPerson(); this.author.setPerson(person); return this; @@ -177,20 +181,20 @@ public Builder author(Person person) { /** * The author of this content. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably. */ - public Builder author(Person.Builder person) { + @NotNull public Builder author(Person.Builder person) { return this.author(person.build()); } /** * An award won by or for this item. */ - public Builder award(String award) { + @NotNull public Builder award(String award) { this.award = award; return this; } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork creativeWork) { + @NotNull public Builder citation(CreativeWork creativeWork) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setCreativeWork(creativeWork); return this; @@ -198,13 +202,13 @@ public Builder citation(CreativeWork creativeWork) { /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(CreativeWork.Builder creativeWork) { + @NotNull public Builder citation(CreativeWork.Builder creativeWork) { return this.citation(creativeWork.build()); } /** * A citation or reference to another creative work, such as another publication, web page, scholarly article, etc. */ - public Builder citation(String citation) { + @NotNull public Builder citation(String citation) { if (this.citation == null) this.citation = new CreativeWorkOrString(); this.citation.setString(citation); return this; @@ -212,40 +216,40 @@ public Builder citation(String citation) { /** * Comments, typically from users. */ - public Builder comment(Comment comment) { + @NotNull public Builder comment(Comment comment) { this.comment = comment; return this; } /** * Comments, typically from users. */ - public Builder comment(Comment.Builder comment) { + @NotNull public Builder comment(Comment.Builder comment) { return this.comment(comment.build()); } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place place) { + @NotNull public Builder contentLocation(Place place) { this.contentLocation = place; return this; } /** * The location depicted or described in the content. For example, the location in a photograph or painting. */ - public Builder contentLocation(Place.Builder place) { + @NotNull public Builder contentLocation(Place.Builder place) { return this.contentLocation(place.build()); } /** * Official rating of a piece of content—for example,'MPAA PG-13'. */ - public Builder contentRating(String contentRating) { + @NotNull public Builder contentRating(String contentRating) { this.contentRating = contentRating; return this; } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization organization) { + @NotNull public Builder contributor(Organization organization) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setOrganization(organization); return this; @@ -253,13 +257,13 @@ public Builder contributor(Organization organization) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Organization.Builder organization) { + @NotNull public Builder contributor(Organization.Builder organization) { return this.contributor(organization.build()); } /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person person) { + @NotNull public Builder contributor(Person person) { if (this.contributor == null) this.contributor = new OrganizationOrPerson(); this.contributor.setPerson(person); return this; @@ -267,13 +271,13 @@ public Builder contributor(Person person) { /** * A secondary contributor to the CreativeWork. */ - public Builder contributor(Person.Builder person) { + @NotNull public Builder contributor(Person.Builder person) { return this.contributor(person.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization organization) { + @NotNull public Builder copyrightHolder(Organization organization) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setOrganization(organization); return this; @@ -281,13 +285,13 @@ public Builder copyrightHolder(Organization organization) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Organization.Builder organization) { + @NotNull public Builder copyrightHolder(Organization.Builder organization) { return this.copyrightHolder(organization.build()); } /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person person) { + @NotNull public Builder copyrightHolder(Person person) { if (this.copyrightHolder == null) this.copyrightHolder = new OrganizationOrPerson(); this.copyrightHolder.setPerson(person); return this; @@ -295,21 +299,21 @@ public Builder copyrightHolder(Person person) { /** * The party holding the legal copyright to the CreativeWork. */ - public Builder copyrightHolder(Person.Builder person) { + @NotNull public Builder copyrightHolder(Person.Builder person) { return this.copyrightHolder(person.build()); } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Integer integer) { + @NotNull public Builder copyrightYear(int copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); - this.copyrightYear.setInteger(integer); + this.copyrightYear.setInt(copyrightYear); return this; } /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Long copyrightYear) { + @NotNull public Builder copyrightYear(long copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setLong(copyrightYear); return this; @@ -317,7 +321,7 @@ public Builder copyrightYear(Long copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Float copyrightYear) { + @NotNull public Builder copyrightYear(float copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setFloat(copyrightYear); return this; @@ -325,7 +329,7 @@ public Builder copyrightYear(Float copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(Double copyrightYear) { + @NotNull public Builder copyrightYear(double copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setDouble(copyrightYear); return this; @@ -333,7 +337,7 @@ public Builder copyrightYear(Double copyrightYear) { /** * The year during which the claimed copyright for the CreativeWork was first asserted. */ - public Builder copyrightYear(String copyrightYear) { + @NotNull public Builder copyrightYear(String copyrightYear) { if (this.copyrightYear == null) this.copyrightYear = new Number(); this.copyrightYear.setString(copyrightYear); return this; @@ -341,7 +345,7 @@ public Builder copyrightYear(String copyrightYear) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization organization) { + @NotNull public Builder creator(Organization organization) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setOrganization(organization); return this; @@ -349,13 +353,13 @@ public Builder creator(Organization organization) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Organization.Builder organization) { + @NotNull public Builder creator(Organization.Builder organization) { return this.creator(organization.build()); } /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person person) { + @NotNull public Builder creator(Person person) { if (this.creator == null) this.creator = new OrganizationOrPerson(); this.creator.setPerson(person); return this; @@ -363,101 +367,101 @@ public Builder creator(Person person) { /** * The creator/author of this CreativeWork. This is the same as the Author property for CreativeWork. */ - public Builder creator(Person.Builder person) { + @NotNull public Builder creator(Person.Builder person) { return this.creator(person.build()); } /** * The date on which the CreativeWork was created. */ - public Builder dateCreated(java.util.Date date) { + @NotNull public Builder dateCreated(java.util.Date date) { this.dateCreated = date; return this; } /** * The date on which the CreativeWork was most recently modified. */ - public Builder dateModified(java.util.Date date) { + @NotNull public Builder dateModified(java.util.Date date) { this.dateModified = date; return this; } /** * Date of first broadcast/publication. */ - public Builder datePublished(java.util.Date date) { + @NotNull public Builder datePublished(java.util.Date date) { this.datePublished = date; return this; } /** * A link to the page containing the comments of the CreativeWork. */ - public Builder discussionUrl(String discussionUrl) { + @NotNull public Builder discussionUrl(String discussionUrl) { this.discussionUrl = discussionUrl; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person person) { + @NotNull public Builder editor(Person person) { this.editor = person; return this; } /** * Specifies the Person who edited the CreativeWork. */ - public Builder editor(Person.Builder person) { + @NotNull public Builder editor(Person.Builder person) { return this.editor(person.build()); } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject alignmentObject) { this.educationalAlignment = alignmentObject; return this; } /** * An alignment to an established educational framework. */ - public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { + @NotNull public Builder educationalAlignment(AlignmentObject.Builder alignmentObject) { return this.educationalAlignment(alignmentObject.build()); } /** * The purpose of a work in the context of education; for example, 'assignment', 'group work'. */ - public Builder educationalUse(String educationalUse) { + @NotNull public Builder educationalUse(String educationalUse) { this.educationalUse = educationalUse; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject mediaObject) { + @NotNull public Builder encoding(MediaObject mediaObject) { this.encoding = mediaObject; return this; } /** * A media object that encodes this CreativeWork. This property is a synonym for associatedMedia. */ - public Builder encoding(MediaObject.Builder mediaObject) { + @NotNull public Builder encoding(MediaObject.Builder mediaObject) { return this.encoding(mediaObject.build()); } /** * Genre of the creative work or group. */ - public Builder genre(String genre) { + @NotNull public Builder genre(String genre) { this.genre = genre; return this; } /** * Headline of the article. */ - public Builder headline(String headline) { + @NotNull public Builder headline(String headline) { this.headline = headline; return this; } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -465,13 +469,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -479,35 +483,35 @@ public Builder inLanguage(String inLanguage) { /** * The predominant mode of learning supported by the learning resource. Acceptable values are 'active', 'expositive', or 'mixed'. */ - public Builder interactivityType(String interactivityType) { + @NotNull public Builder interactivityType(String interactivityType) { this.interactivityType = interactivityType; return this; } /** * A resource that was used in the creation of this resource. This term can be repeated for multiple sources. For example, http://example.com/great-multiplication-intro.html. */ - public Builder isBasedOnUrl(String isBasedOnUrl) { + @NotNull public Builder isBasedOnUrl(String isBasedOnUrl) { this.isBasedOnUrl = isBasedOnUrl; return this; } /** * Indicates whether this content is family friendly. */ - public Builder isFamilyFriendly(Boolean isFamilyFriendly) { + @NotNull public Builder isFamilyFriendly(Boolean isFamilyFriendly) { this.isFamilyFriendly = isFamilyFriendly; return this; } /** * Keywords or tags used to describe this content. Multiple entries in a keywords list are typically delimited by commas. */ - public Builder keywords(String keywords) { + @NotNull public Builder keywords(String keywords) { this.keywords = keywords; return this; } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork creativeWork) { + @NotNull public Builder license(CreativeWork creativeWork) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setCreativeWork(creativeWork); return this; @@ -515,13 +519,13 @@ public Builder license(CreativeWork creativeWork) { /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(CreativeWork.Builder creativeWork) { + @NotNull public Builder license(CreativeWork.Builder creativeWork) { return this.license(creativeWork.build()); } /** * A license document that applies to this content, typically indicated by URL. */ - public Builder license(String license) { + @NotNull public Builder license(String license) { if (this.license == null) this.license = new CreativeWorkOrString(); this.license.setString(license); return this; @@ -529,53 +533,53 @@ public Builder license(String license) { /** * The predominant type or kind characterizing the learning resource. For example, 'presentation', 'handout'. */ - public Builder learningResourceType(String learningResourceType) { + @NotNull public Builder learningResourceType(String learningResourceType) { this.learningResourceType = learningResourceType; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing thing) { + @NotNull public Builder mainEntity(Thing thing) { this.mainEntity = thing; return this; } /** * Indicates the primary entity described in some page or other CreativeWork. */ - public Builder mainEntity(Thing.Builder thing) { + @NotNull public Builder mainEntity(Thing.Builder thing) { return this.mainEntity(thing.build()); } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing thing) { + @NotNull public Builder mentions(Thing thing) { this.mentions = thing; return this; } /** * Indicates that the CreativeWork contains a reference to, but is not necessarily about a concept. */ - public Builder mentions(Thing.Builder thing) { + @NotNull public Builder mentions(Thing.Builder thing) { return this.mentions(thing.build()); } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer offer) { + @NotNull public Builder offers(Offer offer) { this.offers = offer; return this; } /** * An offer to provide this item—for example, an offer to sell a product, rent the DVD of a movie, or give away tickets to an event. */ - public Builder offers(Offer.Builder offer) { + @NotNull public Builder offers(Offer.Builder offer) { return this.offers(offer.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization organization) { + @NotNull public Builder producer(Organization organization) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setOrganization(organization); return this; @@ -583,13 +587,13 @@ public Builder producer(Organization organization) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Organization.Builder organization) { + @NotNull public Builder producer(Organization.Builder organization) { return this.producer(organization.build()); } /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person person) { + @NotNull public Builder producer(Person person) { if (this.producer == null) this.producer = new OrganizationOrPerson(); this.producer.setPerson(person); return this; @@ -597,127 +601,127 @@ public Builder producer(Person person) { /** * The person or organization who produced the work (e.g. music album, movie, tv/radio series etc.). */ - public Builder producer(Person.Builder person) { + @NotNull public Builder producer(Person.Builder person) { return this.producer(person.build()); } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent publicationEvent) { + @NotNull public Builder publication(PublicationEvent publicationEvent) { this.publication = publicationEvent; return this; } /** * A publication event associated with the item. */ - public Builder publication(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder publication(PublicationEvent.Builder publicationEvent) { return this.publication(publicationEvent.build()); } /** * The publisher of the creative work. */ - public Builder publisher(Organization organization) { + @NotNull public Builder publisher(Organization organization) { this.publisher = organization; return this; } /** * The publisher of the creative work. */ - public Builder publisher(Organization.Builder organization) { + @NotNull public Builder publisher(Organization.Builder organization) { return this.publisher(organization.build()); } /** * Link to page describing the editorial principles of the organization primarily responsible for the creation of the CreativeWork. */ - public Builder publishingPrinciples(String publishingPrinciples) { + @NotNull public Builder publishingPrinciples(String publishingPrinciples) { this.publishingPrinciples = publishingPrinciples; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event event) { + @NotNull public Builder recordedAt(Event event) { this.recordedAt = event; return this; } /** * The Event where the CreativeWork was recorded. The CreativeWork may capture all or part of the event. */ - public Builder recordedAt(Event.Builder event) { + @NotNull public Builder recordedAt(Event.Builder event) { return this.recordedAt(event.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization organization) { + @NotNull public Builder sourceOrganization(Organization organization) { this.sourceOrganization = organization; return this; } /** * The Organization on whose behalf the creator was working. */ - public Builder sourceOrganization(Organization.Builder organization) { + @NotNull public Builder sourceOrganization(Organization.Builder organization) { return this.sourceOrganization(organization.build()); } /** * The textual content of this CreativeWork. */ - public Builder text(String text) { + @NotNull public Builder text(String text) { this.text = text; return this; } /** * A thumbnail image relevant to the Thing. */ - public Builder thumbnailUrl(String thumbnailUrl) { + @NotNull public Builder thumbnailUrl(String thumbnailUrl) { this.thumbnailUrl = thumbnailUrl; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration duration) { + @NotNull public Builder timeRequired(Duration duration) { this.timeRequired = duration; return this; } /** * Approximate or typical time it takes to work with or through this learning resource for the typical intended target audience, e.g. 'P30M', 'P1H25M'. */ - public Builder timeRequired(Duration.Builder duration) { + @NotNull public Builder timeRequired(Duration.Builder duration) { return this.timeRequired(duration.build()); } /** * The typical expected age range, e.g. '7-9', '11-'. */ - public Builder typicalAgeRange(String typicalAgeRange) { + @NotNull public Builder typicalAgeRange(String typicalAgeRange) { this.typicalAgeRange = typicalAgeRange; return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Integer integer) { + @NotNull public Builder version(int version) { if (this.version == null) this.version = new Number(); - this.version.setInteger(integer); + this.version.setInt(version); return this; } /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Long version) { + @NotNull public Builder version(long version) { if (this.version == null) this.version = new Number(); this.version.setLong(version); return this; @@ -725,7 +729,7 @@ public Builder version(Long version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Float version) { + @NotNull public Builder version(float version) { if (this.version == null) this.version = new Number(); this.version.setFloat(version); return this; @@ -733,7 +737,7 @@ public Builder version(Float version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(Double version) { + @NotNull public Builder version(double version) { if (this.version == null) this.version = new Number(); this.version.setDouble(version); return this; @@ -741,7 +745,7 @@ public Builder version(Double version) { /** * The version of the CreativeWork embodied by a specified resource. */ - public Builder version(String version) { + @NotNull public Builder version(String version) { if (this.version == null) this.version = new Number(); this.version.setString(version); return this; @@ -749,20 +753,20 @@ public Builder version(String version) { /** * An embedded video object. */ - public Builder video(VideoObject videoObject) { + @NotNull public Builder video(VideoObject videoObject) { this.video = videoObject; return this; } /** * An embedded video object. */ - public Builder video(VideoObject.Builder videoObject) { + @NotNull public Builder video(VideoObject.Builder videoObject) { return this.video(videoObject.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization organization) { + @NotNull public Builder provider(Organization organization) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setOrganization(organization); return this; @@ -770,13 +774,13 @@ public Builder provider(Organization organization) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Organization.Builder organization) { + @NotNull public Builder provider(Organization.Builder organization) { return this.provider(organization.build()); } /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person person) { + @NotNull public Builder provider(Person person) { if (this.provider == null) this.provider = new OrganizationOrPerson(); this.provider.setPerson(person); return this; @@ -784,66 +788,66 @@ public Builder provider(Person person) { /** * The service provider, service operator, or service performer; the goods producer. Another party (a seller) may offer those services or goods on behalf of the provider. A provider may also serve as the seller. */ - public Builder provider(Person.Builder person) { + @NotNull public Builder provider(Person.Builder person) { return this.provider(person.build()); } /** * The number of comments this CreativeWork (e.g. Article, Question or Answer) has received. This is most applicable to works published in Web sites with commenting system; additional comments may exist elsewhere. */ - public Builder commentCount(Integer integer) { - this.commentCount = integer; + @NotNull public Builder commentCount(int commentCount) { + this.commentCount = commentCount; return this; } /** * Indicates a CreativeWork that is (in some sense) a part of this CreativeWork. */ - public Builder hasPart(HasPart hasPart) { + @NotNull public Builder hasPart(HasPart hasPart) { this.hasPart = hasPart; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork creativeWork) { + @NotNull public Builder workExample(CreativeWork creativeWork) { this.workExample = creativeWork; return this; } /** * Example/instance/realization/derivation of the concept of this creative work. eg. The paperback edition, first edition, or eBook. */ - public Builder workExample(CreativeWork.Builder creativeWork) { + @NotNull public Builder workExample(CreativeWork.Builder creativeWork) { return this.workExample(creativeWork.build()); } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork creativeWork) { this.exampleOfWork = creativeWork; return this; } /** * A creative work that this work is an example/instance/realization/derivation of. */ - public Builder exampleOfWork(CreativeWork.Builder creativeWork) { + @NotNull public Builder exampleOfWork(CreativeWork.Builder creativeWork) { return this.exampleOfWork(creativeWork.build()); } /** * Fictional person connected with a creative work. */ - public Builder character(Person person) { + @NotNull public Builder character(Person person) { this.character = person; return this; } /** * Fictional person connected with a creative work. */ - public Builder character(Person.Builder person) { + @NotNull public Builder character(Person.Builder person) { return this.character(person.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization organization) { + @NotNull public Builder translator(Organization organization) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setOrganization(organization); return this; @@ -851,13 +855,13 @@ public Builder translator(Organization organization) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Organization.Builder organization) { + @NotNull public Builder translator(Organization.Builder organization) { return this.translator(organization.build()); } /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person person) { + @NotNull public Builder translator(Person person) { if (this.translator == null) this.translator = new OrganizationOrPerson(); this.translator.setPerson(person); return this; @@ -865,40 +869,40 @@ public Builder translator(Person person) { /** * Organization or person who adapts a creative work to different languages, regional differences and technical requirements of a target market. */ - public Builder translator(Person.Builder person) { + @NotNull public Builder translator(Person.Builder person) { return this.translator(person.build()); } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent publicationEvent) { this.releasedEvent = publicationEvent; return this; } /** * The place and time the release was issued, expressed as a PublicationEvent. */ - public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { + @NotNull public Builder releasedEvent(PublicationEvent.Builder publicationEvent) { return this.releasedEvent(publicationEvent.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -932,7 +936,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -967,7 +971,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -1000,7 +1004,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -1008,38 +1012,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -1102,7 +1106,7 @@ public Builder id(long id) { private Number version; private VideoObject video; private OrganizationOrPerson provider; - private Integer commentCount; + private int commentCount; private HasPart hasPart; private CreativeWork workExample; private CreativeWork exampleOfWork; @@ -1120,144 +1124,144 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder schemaVersion(String schemaVersion); - Builder about(Thing thing); - Builder about(Thing.Builder thing); - Builder accessibilityAPI(String accessibilityAPI); - Builder accessibilityControl(String accessibilityControl); - Builder accessibilityFeature(String accessibilityFeature); - Builder accessibilityHazard(String accessibilityHazard); - Builder accountablePerson(Person person); - Builder accountablePerson(Person.Builder person); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder alternativeHeadline(String alternativeHeadline); - Builder associatedMedia(MediaObject mediaObject); - Builder associatedMedia(MediaObject.Builder mediaObject); - Builder audience(Audience audience); - Builder audience(Audience.Builder audience); - Builder audio(AudioObject audioObject); - Builder audio(AudioObject.Builder audioObject); - Builder author(Organization organization); - Builder author(Organization.Builder organization); - Builder author(Person person); - Builder author(Person.Builder person); - Builder award(String award); - Builder citation(CreativeWork creativeWork); - Builder citation(CreativeWork.Builder creativeWork); - Builder citation(String citation); - Builder comment(Comment comment); - Builder comment(Comment.Builder comment); - Builder contentLocation(Place place); - Builder contentLocation(Place.Builder place); - Builder contentRating(String contentRating); - Builder contributor(Organization organization); - Builder contributor(Organization.Builder organization); - Builder contributor(Person person); - Builder contributor(Person.Builder person); - Builder copyrightHolder(Organization organization); - Builder copyrightHolder(Organization.Builder organization); - Builder copyrightHolder(Person person); - Builder copyrightHolder(Person.Builder person); - Builder copyrightYear(Integer integer); - Builder copyrightYear(Long copyrightYear); - Builder copyrightYear(Float copyrightYear); - Builder copyrightYear(Double copyrightYear); - Builder copyrightYear(String copyrightYear); - Builder creator(Organization organization); - Builder creator(Organization.Builder organization); - Builder creator(Person person); - Builder creator(Person.Builder person); - Builder dateCreated(java.util.Date date); - Builder dateModified(java.util.Date date); - Builder datePublished(java.util.Date date); - Builder discussionUrl(String discussionUrl); - Builder editor(Person person); - Builder editor(Person.Builder person); - Builder educationalAlignment(AlignmentObject alignmentObject); - Builder educationalAlignment(AlignmentObject.Builder alignmentObject); - Builder educationalUse(String educationalUse); - Builder encoding(MediaObject mediaObject); - Builder encoding(MediaObject.Builder mediaObject); - Builder genre(String genre); - Builder headline(String headline); - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder interactivityType(String interactivityType); - Builder isBasedOnUrl(String isBasedOnUrl); - Builder isFamilyFriendly(Boolean isFamilyFriendly); - Builder keywords(String keywords); - Builder license(CreativeWork creativeWork); - Builder license(CreativeWork.Builder creativeWork); - Builder license(String license); - Builder learningResourceType(String learningResourceType); - Builder mainEntity(Thing thing); - Builder mainEntity(Thing.Builder thing); - Builder mentions(Thing thing); - Builder mentions(Thing.Builder thing); - Builder offers(Offer offer); - Builder offers(Offer.Builder offer); - Builder producer(Organization organization); - Builder producer(Organization.Builder organization); - Builder producer(Person person); - Builder producer(Person.Builder person); - Builder publication(PublicationEvent publicationEvent); - Builder publication(PublicationEvent.Builder publicationEvent); - Builder publisher(Organization organization); - Builder publisher(Organization.Builder organization); - Builder publishingPrinciples(String publishingPrinciples); - Builder recordedAt(Event event); - Builder recordedAt(Event.Builder event); - Builder review(Review review); - Builder review(Review.Builder review); - Builder sourceOrganization(Organization organization); - Builder sourceOrganization(Organization.Builder organization); - Builder text(String text); - Builder thumbnailUrl(String thumbnailUrl); - Builder timeRequired(Duration duration); - Builder timeRequired(Duration.Builder duration); - Builder typicalAgeRange(String typicalAgeRange); - Builder version(Integer integer); - Builder version(Long version); - Builder version(Float version); - Builder version(Double version); - Builder version(String version); - Builder video(VideoObject videoObject); - Builder video(VideoObject.Builder videoObject); - Builder provider(Organization organization); - Builder provider(Organization.Builder organization); - Builder provider(Person person); - Builder provider(Person.Builder person); - Builder commentCount(Integer integer); - Builder hasPart(HasPart hasPart); - Builder workExample(CreativeWork creativeWork); - Builder workExample(CreativeWork.Builder creativeWork); - Builder exampleOfWork(CreativeWork creativeWork); - Builder exampleOfWork(CreativeWork.Builder creativeWork); - Builder character(Person person); - Builder character(Person.Builder person); - Builder translator(Organization organization); - Builder translator(Organization.Builder organization); - Builder translator(Person person); - Builder translator(Person.Builder person); - Builder releasedEvent(PublicationEvent publicationEvent); - Builder releasedEvent(PublicationEvent.Builder publicationEvent); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder schemaVersion(String schemaVersion); + @NotNull Builder about(Thing thing); + @NotNull Builder about(Thing.Builder thing); + @NotNull Builder accessibilityAPI(String accessibilityAPI); + @NotNull Builder accessibilityControl(String accessibilityControl); + @NotNull Builder accessibilityFeature(String accessibilityFeature); + @NotNull Builder accessibilityHazard(String accessibilityHazard); + @NotNull Builder accountablePerson(Person person); + @NotNull Builder accountablePerson(Person.Builder person); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder alternativeHeadline(String alternativeHeadline); + @NotNull Builder associatedMedia(MediaObject mediaObject); + @NotNull Builder associatedMedia(MediaObject.Builder mediaObject); + @NotNull Builder audience(Audience audience); + @NotNull Builder audience(Audience.Builder audience); + @NotNull Builder audio(AudioObject audioObject); + @NotNull Builder audio(AudioObject.Builder audioObject); + @NotNull Builder author(Organization organization); + @NotNull Builder author(Organization.Builder organization); + @NotNull Builder author(Person person); + @NotNull Builder author(Person.Builder person); + @NotNull Builder award(String award); + @NotNull Builder citation(CreativeWork creativeWork); + @NotNull Builder citation(CreativeWork.Builder creativeWork); + @NotNull Builder citation(String citation); + @NotNull Builder comment(Comment comment); + @NotNull Builder comment(Comment.Builder comment); + @NotNull Builder contentLocation(Place place); + @NotNull Builder contentLocation(Place.Builder place); + @NotNull Builder contentRating(String contentRating); + @NotNull Builder contributor(Organization organization); + @NotNull Builder contributor(Organization.Builder organization); + @NotNull Builder contributor(Person person); + @NotNull Builder contributor(Person.Builder person); + @NotNull Builder copyrightHolder(Organization organization); + @NotNull Builder copyrightHolder(Organization.Builder organization); + @NotNull Builder copyrightHolder(Person person); + @NotNull Builder copyrightHolder(Person.Builder person); + @NotNull Builder copyrightYear(int copyrightYear); + @NotNull Builder copyrightYear(long copyrightYear); + @NotNull Builder copyrightYear(float copyrightYear); + @NotNull Builder copyrightYear(double copyrightYear); + @NotNull Builder copyrightYear(String copyrightYear); + @NotNull Builder creator(Organization organization); + @NotNull Builder creator(Organization.Builder organization); + @NotNull Builder creator(Person person); + @NotNull Builder creator(Person.Builder person); + @NotNull Builder dateCreated(java.util.Date date); + @NotNull Builder dateModified(java.util.Date date); + @NotNull Builder datePublished(java.util.Date date); + @NotNull Builder discussionUrl(String discussionUrl); + @NotNull Builder editor(Person person); + @NotNull Builder editor(Person.Builder person); + @NotNull Builder educationalAlignment(AlignmentObject alignmentObject); + @NotNull Builder educationalAlignment(AlignmentObject.Builder alignmentObject); + @NotNull Builder educationalUse(String educationalUse); + @NotNull Builder encoding(MediaObject mediaObject); + @NotNull Builder encoding(MediaObject.Builder mediaObject); + @NotNull Builder genre(String genre); + @NotNull Builder headline(String headline); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder interactivityType(String interactivityType); + @NotNull Builder isBasedOnUrl(String isBasedOnUrl); + @NotNull Builder isFamilyFriendly(Boolean isFamilyFriendly); + @NotNull Builder keywords(String keywords); + @NotNull Builder license(CreativeWork creativeWork); + @NotNull Builder license(CreativeWork.Builder creativeWork); + @NotNull Builder license(String license); + @NotNull Builder learningResourceType(String learningResourceType); + @NotNull Builder mainEntity(Thing thing); + @NotNull Builder mainEntity(Thing.Builder thing); + @NotNull Builder mentions(Thing thing); + @NotNull Builder mentions(Thing.Builder thing); + @NotNull Builder offers(Offer offer); + @NotNull Builder offers(Offer.Builder offer); + @NotNull Builder producer(Organization organization); + @NotNull Builder producer(Organization.Builder organization); + @NotNull Builder producer(Person person); + @NotNull Builder producer(Person.Builder person); + @NotNull Builder publication(PublicationEvent publicationEvent); + @NotNull Builder publication(PublicationEvent.Builder publicationEvent); + @NotNull Builder publisher(Organization organization); + @NotNull Builder publisher(Organization.Builder organization); + @NotNull Builder publishingPrinciples(String publishingPrinciples); + @NotNull Builder recordedAt(Event event); + @NotNull Builder recordedAt(Event.Builder event); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder sourceOrganization(Organization organization); + @NotNull Builder sourceOrganization(Organization.Builder organization); + @NotNull Builder text(String text); + @NotNull Builder thumbnailUrl(String thumbnailUrl); + @NotNull Builder timeRequired(Duration duration); + @NotNull Builder timeRequired(Duration.Builder duration); + @NotNull Builder typicalAgeRange(String typicalAgeRange); + @NotNull Builder version(int version); + @NotNull Builder version(long version); + @NotNull Builder version(float version); + @NotNull Builder version(double version); + @NotNull Builder version(String version); + @NotNull Builder video(VideoObject videoObject); + @NotNull Builder video(VideoObject.Builder videoObject); + @NotNull Builder provider(Organization organization); + @NotNull Builder provider(Organization.Builder organization); + @NotNull Builder provider(Person person); + @NotNull Builder provider(Person.Builder person); + @NotNull Builder commentCount(int commentCount); + @NotNull Builder hasPart(HasPart hasPart); + @NotNull Builder workExample(CreativeWork creativeWork); + @NotNull Builder workExample(CreativeWork.Builder creativeWork); + @NotNull Builder exampleOfWork(CreativeWork creativeWork); + @NotNull Builder exampleOfWork(CreativeWork.Builder creativeWork); + @NotNull Builder character(Person person); + @NotNull Builder character(Person.Builder person); + @NotNull Builder translator(Organization organization); + @NotNull Builder translator(Organization.Builder organization); + @NotNull Builder translator(Person person); + @NotNull Builder translator(Person.Builder person); + @NotNull Builder releasedEvent(PublicationEvent publicationEvent); + @NotNull Builder releasedEvent(PublicationEvent.Builder publicationEvent); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } - 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) { + 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, int 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); } } diff --git a/src/main/java/org/schema/WesternConventional.java b/src/main/java/org/schema/WesternConventional.java index 15d47c63..f3f7e443 100644 --- a/src/main/java/org/schema/WesternConventional.java +++ b/src/main/java/org/schema/WesternConventional.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The conventional Western system of medicine, that aims to apply the best available evidence gained from the scientific method to clinical decision making. Also known as conventional or Western medicine. */ @@ -25,7 +29,7 @@ public class WesternConventional { /** * Builder for {@link WesternConventional} */ - public static final class WesternConventionalThingBuilder implements Builder { + static final class WesternConventionalThingBuilder implements Builder { /** * Creates new {@link WesternConventional} instance. */ @@ -34,7 +38,7 @@ public WesternConventional build() { } } public interface Builder extends ThingBuilder { - + } protected WesternConventional() { diff --git a/src/main/java/org/schema/Wholesale.java b/src/main/java/org/schema/Wholesale.java index 7b662207..952f5492 100644 --- a/src/main/java/org/schema/Wholesale.java +++ b/src/main/java/org/schema/Wholesale.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The drug's cost represents the wholesale acquisition cost of the drug. */ @@ -25,7 +29,7 @@ public class Wholesale { /** * Builder for {@link Wholesale} */ - public static final class WholesaleThingBuilder implements Builder { + static final class WholesaleThingBuilder implements Builder { /** * Creates new {@link Wholesale} instance. */ @@ -34,7 +38,7 @@ public Wholesale build() { } } public interface Builder extends ThingBuilder { - + } protected Wholesale() { diff --git a/src/main/java/org/schema/WholesaleStore.java b/src/main/java/org/schema/WholesaleStore.java index 631b5384..222184ff 100644 --- a/src/main/java/org/schema/WholesaleStore.java +++ b/src/main/java/org/schema/WholesaleStore.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A wholesale store. */ @@ -25,7 +29,7 @@ public class WholesaleStore extends Store { /** * Builder for {@link WholesaleStore} */ - public static final class WholesaleStoreThingBuilder implements Builder { + static final class WholesaleStoreThingBuilder implements Builder { /** * Creates new {@link WholesaleStore} instance. */ @@ -35,107 +39,107 @@ public WholesaleStore build() { /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -143,13 +147,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -157,27 +161,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -185,13 +189,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -199,7 +203,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -207,13 +211,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -221,20 +225,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -242,13 +246,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -256,26 +260,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -285,7 +289,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -295,27 +299,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -349,7 +353,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -384,7 +388,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -417,7 +421,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -425,38 +429,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -494,56 +498,56 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/WikiDoc.java b/src/main/java/org/schema/WikiDoc.java index d3bdd22d..7b27d529 100644 --- a/src/main/java/org/schema/WikiDoc.java +++ b/src/main/java/org/schema/WikiDoc.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * This class contains information contributed by WikiDoc. */ @@ -25,7 +29,7 @@ public class WikiDoc { /** * Builder for {@link WikiDoc} */ - public static final class WikiDocThingBuilder implements Builder { + static final class WikiDocThingBuilder implements Builder { /** * Creates new {@link WikiDoc} instance. */ @@ -34,7 +38,7 @@ public WikiDoc build() { } } public interface Builder extends ThingBuilder { - + } protected WikiDoc() { diff --git a/src/main/java/org/schema/WinAction.java b/src/main/java/org/schema/WinAction.java index 462a07b0..2f364194 100644 --- a/src/main/java/org/schema/WinAction.java +++ b/src/main/java/org/schema/WinAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of achieving victory in a competitive activity. */ @@ -31,7 +35,7 @@ public Person getLoser() { /** * Builder for {@link WinAction} */ - public static final class WinActionThingBuilder implements Builder { + static final class WinActionThingBuilder implements Builder { /** * Creates new {@link WinAction} instance. */ @@ -41,20 +45,20 @@ public WinAction build() { /** * A sub property of participant. The loser of the action. */ - public Builder loser(Person person) { + @NotNull public Builder loser(Person person) { this.loser = person; return this; } /** * A sub property of participant. The loser of the action. */ - public Builder loser(Person.Builder person) { + @NotNull public Builder loser(Person.Builder person) { return this.loser(person.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -62,13 +66,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -76,7 +80,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -84,7 +88,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -93,67 +97,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -187,7 +191,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -222,7 +226,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -255,7 +259,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -263,38 +267,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -319,32 +323,32 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder loser(Person person); - Builder loser(Person.Builder person); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder loser(Person person); + @NotNull Builder loser(Person.Builder person); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected WinAction(Person loser, 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) { diff --git a/src/main/java/org/schema/Winery.java b/src/main/java/org/schema/Winery.java index 6eff8e60..264bce5e 100644 --- a/src/main/java/org/schema/Winery.java +++ b/src/main/java/org/schema/Winery.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A winery. */ @@ -25,7 +29,7 @@ public class Winery extends FoodEstablishment { /** * Builder for {@link Winery} */ - public static final class WineryThingBuilder implements Builder { + static final class WineryThingBuilder implements Builder { /** * Creates new {@link Winery} instance. */ @@ -35,7 +39,7 @@ public Winery build() { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(Boolean acceptsReservations) { + @NotNull public Builder acceptsReservations(Boolean acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setBoolean(acceptsReservations); return this; @@ -43,7 +47,7 @@ public Builder acceptsReservations(Boolean acceptsReservations) { /** * Indicates whether a FoodEstablishment accepts reservations. Values can be Boolean, an URL at which reservations can be made or (for backwards compatibility) the strings Yes or No. */ - public Builder acceptsReservations(String acceptsReservations) { + @NotNull public Builder acceptsReservations(String acceptsReservations) { if (this.acceptsReservations == null) this.acceptsReservations = new BooleanOrString(); this.acceptsReservations.setString(acceptsReservations); return this; @@ -51,121 +55,121 @@ public Builder acceptsReservations(String acceptsReservations) { /** * Either the actual menu or a URL of the menu. */ - public Builder menu(String menu) { + @NotNull public Builder menu(String menu) { this.menu = menu; return this; } /** * The cuisine of the restaurant. */ - public Builder servesCuisine(String servesCuisine) { + @NotNull public Builder servesCuisine(String servesCuisine) { this.servesCuisine = servesCuisine; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization organization) { + @NotNull public Builder parentOrganization(Organization organization) { this.parentOrganization = organization; return this; } /** * The larger organization that this local business is a branch of, if any. */ - public Builder parentOrganization(Organization.Builder organization) { + @NotNull public Builder parentOrganization(Organization.Builder organization) { return this.parentOrganization(organization.build()); } /** * The currency accepted (in ISO 4217 currency format). */ - public Builder currenciesAccepted(String currenciesAccepted) { + @NotNull public Builder currenciesAccepted(String currenciesAccepted) { this.currenciesAccepted = currenciesAccepted; return this; } /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Cash, credit card, etc. */ - public Builder paymentAccepted(String paymentAccepted) { + @NotNull public Builder paymentAccepted(String paymentAccepted) { this.paymentAccepted = paymentAccepted; return this; } /** * The price range of the business, for example $$$. */ - public Builder priceRange(String priceRange) { + @NotNull public Builder priceRange(String priceRange) { this.priceRange = priceRange; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -173,13 +177,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -187,27 +191,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -215,13 +219,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -229,7 +233,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -237,13 +241,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -251,20 +255,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -272,13 +276,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -286,26 +290,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -315,7 +319,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -325,27 +329,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -379,7 +383,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -414,7 +418,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -447,7 +451,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -455,38 +459,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -527,60 +531,60 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder acceptsReservations(Boolean acceptsReservations); - Builder acceptsReservations(String acceptsReservations); - Builder menu(String menu); - Builder servesCuisine(String servesCuisine); - Builder parentOrganization(Organization organization); - Builder parentOrganization(Organization.Builder organization); - Builder currenciesAccepted(String currenciesAccepted); - Builder openingHours(String openingHours); - Builder paymentAccepted(String paymentAccepted); - Builder priceRange(String priceRange); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder acceptsReservations(Boolean acceptsReservations); + @NotNull Builder acceptsReservations(String acceptsReservations); + @NotNull Builder menu(String menu); + @NotNull Builder servesCuisine(String servesCuisine); + @NotNull Builder parentOrganization(Organization organization); + @NotNull Builder parentOrganization(Organization.Builder organization); + @NotNull Builder currenciesAccepted(String currenciesAccepted); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder paymentAccepted(String paymentAccepted); + @NotNull Builder priceRange(String priceRange); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) { diff --git a/src/main/java/org/schema/Withdrawn.java b/src/main/java/org/schema/Withdrawn.java index 76464bef..0562cd19 100644 --- a/src/main/java/org/schema/Withdrawn.java +++ b/src/main/java/org/schema/Withdrawn.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * Withdrawn. */ @@ -25,7 +29,7 @@ public class Withdrawn { /** * Builder for {@link Withdrawn} */ - public static final class WithdrawnThingBuilder implements Builder { + static final class WithdrawnThingBuilder implements Builder { /** * Creates new {@link Withdrawn} instance. */ @@ -34,7 +38,7 @@ public Withdrawn build() { } } public interface Builder extends ThingBuilder { - + } protected Withdrawn() { diff --git a/src/main/java/org/schema/WriteAction.java b/src/main/java/org/schema/WriteAction.java index 54e8e235..21cdd687 100644 --- a/src/main/java/org/schema/WriteAction.java +++ b/src/main/java/org/schema/WriteAction.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The act of authoring written creative content. */ @@ -31,7 +35,7 @@ public LanguageOrString getInLanguage() { /** * Builder for {@link WriteAction} */ - public static final class WriteActionThingBuilder implements Builder { + static final class WriteActionThingBuilder implements Builder { /** * Creates new {@link WriteAction} instance. */ @@ -41,7 +45,7 @@ public WriteAction build() { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language language) { + @NotNull public Builder inLanguage(Language language) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setLanguage(language); return this; @@ -49,13 +53,13 @@ public Builder inLanguage(Language language) { /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(Language.Builder language) { + @NotNull public Builder inLanguage(Language.Builder language) { return this.inLanguage(language.build()); } /** * The language of the content or performance or used in an action. Please use one of the language codes from the IETF BCP 47 standard. */ - public Builder inLanguage(String inLanguage) { + @NotNull public Builder inLanguage(String inLanguage) { if (this.inLanguage == null) this.inLanguage = new LanguageOrString(); this.inLanguage.setString(inLanguage); return this; @@ -63,7 +67,7 @@ public Builder inLanguage(String inLanguage) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization organization) { + @NotNull public Builder agent(Organization organization) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setOrganization(organization); return this; @@ -71,13 +75,13 @@ public Builder agent(Organization organization) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Organization.Builder organization) { + @NotNull public Builder agent(Organization.Builder organization) { return this.agent(organization.build()); } /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person person) { + @NotNull public Builder agent(Person person) { if (this.agent == null) this.agent = new OrganizationOrPerson(); this.agent.setPerson(person); return this; @@ -85,7 +89,7 @@ public Builder agent(Person person) { /** * The direct performer or driver of the action (animate or inanimate). e.g. *John* wrote a book. */ - public Builder agent(Person.Builder person) { + @NotNull public Builder agent(Person.Builder person) { return this.agent(person.build()); } /** @@ -93,7 +97,7 @@ public Builder agent(Person.Builder person) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder endTime(java.util.Date date) { + @NotNull public Builder endTime(java.util.Date date) { this.endTime = date; return this; } @@ -102,67 +106,67 @@ public Builder endTime(java.util.Date date) { Note that Event uses startDate/endDate instead of startTime/endTime, even when describing dates with times. This situation may be clarified in future revisions. */ - public Builder startTime(java.util.Date date) { + @NotNull public Builder startTime(java.util.Date date) { this.startTime = date; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType actionStatusType) { this.actionStatus = actionStatusType; return this; } /** * Indicates the current disposition of the Action. */ - public Builder actionStatus(ActionStatusType.Builder actionStatusType) { + @NotNull public Builder actionStatus(ActionStatusType.Builder actionStatusType) { return this.actionStatus(actionStatusType.build()); } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing thing) { + @NotNull public Builder error(Thing thing) { this.error = thing; return this; } /** * For failed actions, more information on the cause of the failure. */ - public Builder error(Thing.Builder thing) { + @NotNull public Builder error(Thing.Builder thing) { return this.error(thing.build()); } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint entryPoint) { + @NotNull public Builder target(EntryPoint entryPoint) { this.target = entryPoint; return this; } /** * Indicates a target EntryPoint for an Action. */ - public Builder target(EntryPoint.Builder entryPoint) { + @NotNull public Builder target(EntryPoint.Builder entryPoint) { return this.target(entryPoint.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -196,7 +200,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -231,7 +235,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -264,7 +268,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -272,38 +276,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -328,33 +332,33 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder inLanguage(Language language); - Builder inLanguage(Language.Builder language); - Builder inLanguage(String inLanguage); - Builder agent(Organization organization); - Builder agent(Organization.Builder organization); - Builder agent(Person person); - Builder agent(Person.Builder person); - Builder endTime(java.util.Date date); - Builder startTime(java.util.Date date); - Builder actionStatus(ActionStatusType actionStatusType); - Builder actionStatus(ActionStatusType.Builder actionStatusType); - Builder error(Thing thing); - Builder error(Thing.Builder thing); - Builder target(EntryPoint entryPoint); - Builder target(EntryPoint.Builder entryPoint); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder inLanguage(Language language); + @NotNull Builder inLanguage(Language.Builder language); + @NotNull Builder inLanguage(String inLanguage); + @NotNull Builder agent(Organization organization); + @NotNull Builder agent(Organization.Builder organization); + @NotNull Builder agent(Person person); + @NotNull Builder agent(Person.Builder person); + @NotNull Builder endTime(java.util.Date date); + @NotNull Builder startTime(java.util.Date date); + @NotNull Builder actionStatus(ActionStatusType actionStatusType); + @NotNull Builder actionStatus(ActionStatusType.Builder actionStatusType); + @NotNull Builder error(Thing thing); + @NotNull Builder error(Thing.Builder thing); + @NotNull Builder target(EntryPoint entryPoint); + @NotNull Builder target(EntryPoint.Builder entryPoint); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } protected WriteAction(LanguageOrString inLanguage, 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) { diff --git a/src/main/java/org/schema/XRay.java b/src/main/java/org/schema/XRay.java index 9ee20ffb..f3b7b2e1 100644 --- a/src/main/java/org/schema/XRay.java +++ b/src/main/java/org/schema/XRay.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * X-ray imaging. */ @@ -25,7 +29,7 @@ public class XRay { /** * Builder for {@link XRay} */ - public static final class XRayThingBuilder implements Builder { + static final class XRayThingBuilder implements Builder { /** * Creates new {@link XRay} instance. */ @@ -34,7 +38,7 @@ public XRay build() { } } public interface Builder extends ThingBuilder { - + } protected XRay() { diff --git a/src/main/java/org/schema/ZoneBoardingPolicy.java b/src/main/java/org/schema/ZoneBoardingPolicy.java index cbb02a7a..9f58ea70 100644 --- a/src/main/java/org/schema/ZoneBoardingPolicy.java +++ b/src/main/java/org/schema/ZoneBoardingPolicy.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * The airline boards by zones of the plane. */ @@ -25,7 +29,7 @@ public class ZoneBoardingPolicy { /** * Builder for {@link ZoneBoardingPolicy} */ - public static final class ZoneBoardingPolicyThingBuilder implements Builder { + static final class ZoneBoardingPolicyThingBuilder implements Builder { /** * Creates new {@link ZoneBoardingPolicy} instance. */ @@ -34,7 +38,7 @@ public ZoneBoardingPolicy build() { } } public interface Builder extends ThingBuilder { - + } protected ZoneBoardingPolicy() { diff --git a/src/main/java/org/schema/Zoo.java b/src/main/java/org/schema/Zoo.java index d42a8d6b..571c966b 100644 --- a/src/main/java/org/schema/Zoo.java +++ b/src/main/java/org/schema/Zoo.java @@ -18,6 +18,10 @@ package org.schema; +import com.fasterxml.jackson.databind.annotation.*; +import com.fasterxml.jackson.annotation.*; +import org.jetbrains.annotations.*; + /** * A zoo. */ @@ -25,7 +29,7 @@ public class Zoo extends CivicStructure { /** * Builder for {@link Zoo} */ - public static final class ZooThingBuilder implements Builder { + static final class ZooThingBuilder implements Builder { /** * Creates new {@link Zoo} instance. */ @@ -35,73 +39,73 @@ public Zoo build() { /** * The opening hours for a business. Opening hours can be specified as a weekly time range, starting with days, then times per day. Multiple days can be listed with commas ',' separating each day. Day or time ranges are specified using a hyphen '-'.
- Days are specified using the following two-letter combinations: Mo, Tu, We, Th, Fr, Sa, Su.
- Times are specified using 24:00 time. For example, 3pm is specified as 15:00.
- Here is an example: <time itemprop="openingHours" datetime="Tu,Th 16:00-20:00">Tuesdays and Thursdays 4-8pm</time>.
- If a business is open 7 days a week, then it can be specified as <time itemprop="openingHours" datetime="Mo-Su">Monday through Sunday, all day</time>. */ - public Builder openingHours(String openingHours) { + @NotNull public Builder openingHours(String openingHours) { this.openingHours = openingHours; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress postalAddress) { + @NotNull public Builder address(PostalAddress postalAddress) { this.address = postalAddress; return this; } /** * Physical address of the item. */ - public Builder address(PostalAddress.Builder postalAddress) { + @NotNull public Builder address(PostalAddress.Builder postalAddress) { return this.address(postalAddress.build()); } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating aggregateRating) { this.aggregateRating = aggregateRating; return this; } /** * The overall rating, based on a collection of reviews or ratings, of the item. */ - public Builder aggregateRating(AggregateRating.Builder aggregateRating) { + @NotNull public Builder aggregateRating(AggregateRating.Builder aggregateRating) { return this.aggregateRating(aggregateRating.build()); } /** * The basic containment relation between places. */ - public Builder containedIn(Place place) { + @NotNull public Builder containedIn(Place place) { this.containedIn = place; return this; } /** * The basic containment relation between places. */ - public Builder containedIn(Place.Builder place) { + @NotNull public Builder containedIn(Place.Builder place) { return this.containedIn(place.build()); } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event event) { + @NotNull public Builder event(Event event) { this.event = event; return this; } /** * Upcoming or past event associated with this place, organization, or action. */ - public Builder event(Event.Builder event) { + @NotNull public Builder event(Event.Builder event) { return this.event(event.build()); } /** * The fax number. */ - public Builder faxNumber(String faxNumber) { + @NotNull public Builder faxNumber(String faxNumber) { this.faxNumber = faxNumber; return this; } /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates geoCoordinates) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoCoordinates(geoCoordinates); return this; @@ -109,13 +113,13 @@ public Builder geo(GeoCoordinates geoCoordinates) { /** * The geo coordinates of the place. */ - public Builder geo(GeoCoordinates.Builder geoCoordinates) { + @NotNull public Builder geo(GeoCoordinates.Builder geoCoordinates) { return this.geo(geoCoordinates.build()); } /** * The geo coordinates of the place. */ - public Builder geo(GeoShape geoShape) { + @NotNull public Builder geo(GeoShape geoShape) { if (this.geo == null) this.geo = new GeoCoordinatesOrGeoShape(); this.geo.setGeoShape(geoShape); return this; @@ -123,27 +127,27 @@ public Builder geo(GeoShape geoShape) { /** * The geo coordinates of the place. */ - public Builder geo(GeoShape.Builder geoShape) { + @NotNull public Builder geo(GeoShape.Builder geoShape) { return this.geo(geoShape.build()); } /** * The Global Location Number (GLN, sometimes also referred to as International Location Number or ILN) of the respective organization, person, or place. The GLN is a 13-digit number used to identify parties and physical locations. */ - public Builder globalLocationNumber(String globalLocationNumber) { + @NotNull public Builder globalLocationNumber(String globalLocationNumber) { this.globalLocationNumber = globalLocationNumber; return this; } /** * The International Standard of Industrial Classification of All Economic Activities (ISIC), Revision 4 code for a particular organization, business person, or place. */ - public Builder isicV4(String isicV4) { + @NotNull public Builder isicV4(String isicV4) { this.isicV4 = isicV4; return this; } /** * An associated logo. */ - public Builder logo(ImageObject imageObject) { + @NotNull public Builder logo(ImageObject imageObject) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setImageObject(imageObject); return this; @@ -151,13 +155,13 @@ public Builder logo(ImageObject imageObject) { /** * An associated logo. */ - public Builder logo(ImageObject.Builder imageObject) { + @NotNull public Builder logo(ImageObject.Builder imageObject) { return this.logo(imageObject.build()); } /** * An associated logo. */ - public Builder logo(String logo) { + @NotNull public Builder logo(String logo) { if (this.logo == null) this.logo = new ImageObjectOrString(); this.logo.setString(logo); return this; @@ -165,7 +169,7 @@ public Builder logo(String logo) { /** * A URL to a map of the place. */ - public Builder hasMap(Map map) { + @NotNull public Builder hasMap(Map map) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setMap(map); return this; @@ -173,13 +177,13 @@ public Builder hasMap(Map map) { /** * A URL to a map of the place. */ - public Builder hasMap(Map.Builder map) { + @NotNull public Builder hasMap(Map.Builder map) { return this.hasMap(map.build()); } /** * A URL to a map of the place. */ - public Builder hasMap(String hasMap) { + @NotNull public Builder hasMap(String hasMap) { if (this.hasMap == null) this.hasMap = new MapOrString(); this.hasMap.setString(hasMap); return this; @@ -187,20 +191,20 @@ public Builder hasMap(String hasMap) { /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification) { this.openingHoursSpecification = openingHoursSpecification; return this; } /** * The opening hours of a certain place. */ - public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { + @NotNull public Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification) { return this.openingHoursSpecification(openingHoursSpecification.build()); } /** * A photograph of this place. */ - public Builder photo(ImageObject imageObject) { + @NotNull public Builder photo(ImageObject imageObject) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setImageObject(imageObject); return this; @@ -208,13 +212,13 @@ public Builder photo(ImageObject imageObject) { /** * A photograph of this place. */ - public Builder photo(ImageObject.Builder imageObject) { + @NotNull public Builder photo(ImageObject.Builder imageObject) { return this.photo(imageObject.build()); } /** * A photograph of this place. */ - public Builder photo(Photograph photograph) { + @NotNull public Builder photo(Photograph photograph) { if (this.photo == null) this.photo = new ImageObjectOrPhotograph(); this.photo.setPhotograph(photograph); return this; @@ -222,26 +226,26 @@ public Builder photo(Photograph photograph) { /** * A photograph of this place. */ - public Builder photo(Photograph.Builder photograph) { + @NotNull public Builder photo(Photograph.Builder photograph) { return this.photo(photograph.build()); } /** * A review of the item. */ - public Builder review(Review review) { + @NotNull public Builder review(Review review) { this.review = review; return this; } /** * A review of the item. */ - public Builder review(Review.Builder review) { + @NotNull public Builder review(Review.Builder review) { return this.review(review.build()); } /** * The telephone number. */ - public Builder telephone(String telephone) { + @NotNull public Builder telephone(String telephone) { this.telephone = telephone; return this; } @@ -251,7 +255,7 @@ public Builder telephone(String telephone) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue propertyValue) { this.additionalProperty = propertyValue; return this; } @@ -261,27 +265,27 @@ public Builder additionalProperty(PropertyValue propertyValue) { Note: Publishers should be aware that applications designed to use specific schema.org properties (e.g. http://schema.org/width, http://schema.org/color, http://schema.org/gtin13, ...) will typically expect such data to be provided using those properties, rather than using the generic property/value mechanism. */ - public Builder additionalProperty(PropertyValue.Builder propertyValue) { + @NotNull public Builder additionalProperty(PropertyValue.Builder propertyValue) { return this.additionalProperty(propertyValue.build()); } /** * An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax. This is a relationship between something and a class that the thing is in. In RDFa syntax, it is better to use the native RDFa syntax - the 'typeof' attribute - for multiple types. Schema.org tools may have only weaker understanding of extra types, in particular those defined externally. */ - public Builder additionalType(String additionalType) { + @NotNull public Builder additionalType(String additionalType) { this.additionalType = additionalType; return this; } /** * An alias for the item. */ - public Builder alternateName(String alternateName) { + @NotNull public Builder alternateName(String alternateName) { this.alternateName = alternateName; return this; } /** * A short description of the item. */ - public Builder description(String description) { + @NotNull public Builder description(String description) { this.description = description; return this; } @@ -315,7 +319,7 @@ public Builder description(String description) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork creativeWork) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setCreativeWork(creativeWork); return this; @@ -350,7 +354,7 @@ public Builder mainEntityOfPage(CreativeWork creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { + @NotNull public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { return this.mainEntityOfPage(creativeWork.build()); } /** @@ -383,7 +387,7 @@ public Builder mainEntityOfPage(CreativeWork.Builder creativeWork) { should refer to the news article or review, respectively, while about would more properly refer to the person or product. */ - public Builder mainEntityOfPage(String mainEntityOfPage) { + @NotNull public Builder mainEntityOfPage(String mainEntityOfPage) { if (this.mainEntityOfPage == null) this.mainEntityOfPage = new CreativeWorkOrString(); this.mainEntityOfPage.setString(mainEntityOfPage); return this; @@ -391,38 +395,38 @@ public Builder mainEntityOfPage(String mainEntityOfPage) { /** * The name of the item. */ - public Builder name(String name) { + @NotNull public Builder name(String name) { this.name = name; return this; } /** * URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Freebase page, or official website. */ - public Builder sameAs(String sameAs) { + @NotNull public Builder sameAs(String sameAs) { this.sameAs = sameAs; return this; } /** * URL of the item. */ - public Builder url(String url) { + @NotNull public Builder url(String url) { this.url = url; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action action) { + @NotNull public Builder potentialAction(Action action) { this.potentialAction = action; return this; } /** * Indicates a potential Action, which describes an idealized action in which this thing would play an 'object' role. */ - public Builder potentialAction(Action.Builder action) { + @NotNull public Builder potentialAction(Action.Builder action) { return this.potentialAction(action.build()); } - public Builder id(String id) { + @NotNull public Builder id(String id) { this.id = id; return this; } @@ -456,51 +460,51 @@ public Builder id(long id) { private String id; } public interface Builder extends ThingBuilder { - Builder openingHours(String openingHours); - Builder address(PostalAddress postalAddress); - Builder address(PostalAddress.Builder postalAddress); - Builder aggregateRating(AggregateRating aggregateRating); - Builder aggregateRating(AggregateRating.Builder aggregateRating); - Builder containedIn(Place place); - Builder containedIn(Place.Builder place); - Builder event(Event event); - Builder event(Event.Builder event); - Builder faxNumber(String faxNumber); - Builder geo(GeoCoordinates geoCoordinates); - Builder geo(GeoCoordinates.Builder geoCoordinates); - Builder geo(GeoShape geoShape); - Builder geo(GeoShape.Builder geoShape); - Builder globalLocationNumber(String globalLocationNumber); - Builder isicV4(String isicV4); - Builder logo(ImageObject imageObject); - Builder logo(ImageObject.Builder imageObject); - Builder logo(String logo); - Builder hasMap(Map map); - Builder hasMap(Map.Builder map); - Builder hasMap(String hasMap); - Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); - Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); - Builder photo(ImageObject imageObject); - Builder photo(ImageObject.Builder imageObject); - Builder photo(Photograph photograph); - Builder photo(Photograph.Builder photograph); - Builder review(Review review); - Builder review(Review.Builder review); - Builder telephone(String telephone); - Builder additionalProperty(PropertyValue propertyValue); - Builder additionalProperty(PropertyValue.Builder propertyValue); - Builder additionalType(String additionalType); - Builder alternateName(String alternateName); - Builder description(String description); - Builder mainEntityOfPage(CreativeWork creativeWork); - Builder mainEntityOfPage(CreativeWork.Builder creativeWork); - Builder mainEntityOfPage(String mainEntityOfPage); - Builder name(String name); - Builder sameAs(String sameAs); - Builder url(String url); - Builder potentialAction(Action action); - Builder potentialAction(Action.Builder action); - Builder id(String id); + @NotNull Builder openingHours(String openingHours); + @NotNull Builder address(PostalAddress postalAddress); + @NotNull Builder address(PostalAddress.Builder postalAddress); + @NotNull Builder aggregateRating(AggregateRating aggregateRating); + @NotNull Builder aggregateRating(AggregateRating.Builder aggregateRating); + @NotNull Builder containedIn(Place place); + @NotNull Builder containedIn(Place.Builder place); + @NotNull Builder event(Event event); + @NotNull Builder event(Event.Builder event); + @NotNull Builder faxNumber(String faxNumber); + @NotNull Builder geo(GeoCoordinates geoCoordinates); + @NotNull Builder geo(GeoCoordinates.Builder geoCoordinates); + @NotNull Builder geo(GeoShape geoShape); + @NotNull Builder geo(GeoShape.Builder geoShape); + @NotNull Builder globalLocationNumber(String globalLocationNumber); + @NotNull Builder isicV4(String isicV4); + @NotNull Builder logo(ImageObject imageObject); + @NotNull Builder logo(ImageObject.Builder imageObject); + @NotNull Builder logo(String logo); + @NotNull Builder hasMap(Map map); + @NotNull Builder hasMap(Map.Builder map); + @NotNull Builder hasMap(String hasMap); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification openingHoursSpecification); + @NotNull Builder openingHoursSpecification(OpeningHoursSpecification.Builder openingHoursSpecification); + @NotNull Builder photo(ImageObject imageObject); + @NotNull Builder photo(ImageObject.Builder imageObject); + @NotNull Builder photo(Photograph photograph); + @NotNull Builder photo(Photograph.Builder photograph); + @NotNull Builder review(Review review); + @NotNull Builder review(Review.Builder review); + @NotNull Builder telephone(String telephone); + @NotNull Builder additionalProperty(PropertyValue propertyValue); + @NotNull Builder additionalProperty(PropertyValue.Builder propertyValue); + @NotNull Builder additionalType(String additionalType); + @NotNull Builder alternateName(String alternateName); + @NotNull Builder description(String description); + @NotNull Builder mainEntityOfPage(CreativeWork creativeWork); + @NotNull Builder mainEntityOfPage(CreativeWork.Builder creativeWork); + @NotNull Builder mainEntityOfPage(String mainEntityOfPage); + @NotNull Builder name(String name); + @NotNull Builder sameAs(String sameAs); + @NotNull Builder url(String url); + @NotNull Builder potentialAction(Action action); + @NotNull Builder potentialAction(Action.Builder action); + @NotNull Builder id(String id); } 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) {